- Connect your VESC via USB to your host computer.
- Open the appropriate version of the VESC Tool.
- Click Autoconnect.
- Go to the Firmware section on the left.
- Go to the Bootloader tab at the top.
- Click the Upload button in the bottom-right.
- Click "Write Motor Configuration".
- Click "Write App Configuration".
- Go to the Custom File tab.
- Click the folder icon and browse to the appropriate VESC_TOOL folder and firmware binary for your VESC.
- Click the Upload button in the bottom-right.
Once this is complete, wait at least 10 seconds before re-connecting to configure additional parameters.
The bldc
firmware requires the gcc-arm-none-eabi
.
In order to avoid causing problems with your environment, it is recommended to do this in Docker.
Once Docker is installed, you can run the following to build your own, custom firmware with the servo out enabled:
$ cd ~
$ git clone https://github.com/vedderb/bldc.git
$ cd bldc
$ docker run -it --rm -v $(pwd):/root/workspace -w /root/workspace ubuntu:18.04
ubuntu$ apt-get update && apt-get install build-essential gcc-arm-none-eabi binutils-arm-none-eabi
After running these commands, your Docker environment will be ready to build the firmware.
However, you will need to modify the conf_general.h
file to select the firmware you want to build.
Since March 31, 2021
you don't have to enable servo output during firmware building. It can be enabled from VESC_tool (App Settings > PPM).
(For older versions, set SERVO_OUT_ENABLE
to 1.)
To choose which board to build the firmware for, un-comment the .h
and .c
files for your board.
The boards that are currently supported by this repository are:
- VESC 6 MkIII ->
hw_60.h
andhw_60.c
. Also uncomment#define HW60_IS_MK3
(make sure the otherHW60_IS_
lines are commented out). - VESC SIX+ ->
hw_60.h
andhw_60.c
. Also uncomment#define HW60_IS_MK4
(make sure the otherHW60_IS_
lines are commented out). - VESC 6 MkV ->
hw_60.h
andhw_60.c
. Also uncomment#define HW60_IS_MK5
(make sure the otherHW60_IS_
lines are commented out). - FLIPSKY MiniFSESC 4.20 ->
hw_410.h
andhw_410.c
.
Once you have modified the conf_general.h
file as necessary, run the command make
in your Docker container.
This will generate a file called build/BLDC_4_ChibiOS.bin
which is the custom firmware.
It is recommended to rename this file to match your hardware and move it out of the Docker container.
You can then use this file with the instructions above to flash your VESC.