There are two methods to flash firmware onto a VESC: using a SWD hardware debugger, or uploading via VESC Tool over USB.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/vedderb/bldc/llms.txt
Use this file to discover all available pages before exploring further.
Method 1: SWD debugger
Requires STLink or compatible JTAG/SWD probe. Needed for first-time flashing and recovering a bricked device.
Method 2: VESC Tool USB
Upload a
.bin file through the VESC Tool application. No extra hardware required once a bootloader is present.Method 1: SWD debugger
This method uses OpenOCD and a SWD/JTAG probe (such as an STLink v2) to write firmware directly to the device.Flash the bootloader
Before flashing application firmware for the first time, you must flash the bootloader. Clone and build the bldc-bootloader project and follow its instructions.
On Linux, you can use the STLink v2 programmer without root access by installing the udev rules. See Prerequisites for the commands.
Method 2: VESC Tool USB upload
This method uploads a compiled.bin file through the VESC Tool application over USB. A working bootloader must already be present on the device.
Build the firmware
Build the The output file is located at
.bin file for your board:build/100_250/100_250.bin.Select your firmware file
Click the Custom file tab, then click the folder icon to browse for and select your
.bin file (e.g. build/100_250/100_250.bin).Start the upload
Press the upload firmware button (downward arrow) in the bottom right to begin the upload.It is normal for VESC Tool to show a disconnect during the upload process.
Wait for completion
Wait for the loading bar to complete, then wait an additional 10 seconds before disconnecting anything.
If your VESC is bricked
A bricked VESC cannot accept USB firmware uploads because the bootloader is no longer functional. To recover:- Use a SWD debugger (Method 1 above) to re-flash valid firmware directly.
- You must flash the bootloader first, then the application firmware.
A SWD debugger is the only way to recover a bricked VESC. Keep one available if you are frequently updating firmware.
