Quickstart
This guide walks you through building VESC firmware from source and uploading it to your controller. You will need a supported hardware target — see Supported hardware for the full list.Prerequisites
- Ubuntu / Linux
- macOS
- Windows
Install the required system packages:Optionally, add udev rules so you can use an STLink v2 programmer without
sudo:Build the firmware
1
Clone the repository
- Linux / macOS
- Windows
Open a terminal and run:
2
Check out the master branch
3
Install the ARM GCC toolchain
The Makefile downloads and installs the GNU ARM GCC toolchain into the You only need to do this once.
tools/ directory:4
Find your target board name
Run The output lists every available target under
make without arguments to see the full list of supported boards:[Firmware]. Pick the one that matches your hardware. For example, a Trampa VESC 100/250 uses the target name 100_250.5
Build firmware for your target
Pass your target name to The compiled firmware is placed in
make. Replace 100_250 with your actual target:build/100_250/. You will find both an ELF file and a .bin file there.Flash the firmware
There are two ways to get the firmware onto your controller. Method 1 (SWD) is required for a fresh controller or a bricked device. Method 2 (VESC Tool USB) is more convenient for routine updates.Method 1 — Flash via STLink SWD debugger
1
Flash the bootloader
A SWD flash always requires the bootloader to be present first. Clone and build it from github.com/vedderb/bldc-bootloader, then flash it via SWD before proceeding.
2
Flash the firmware
Use the Substitute
_flash make target for your board. This invokes OpenOCD over SWD/JTAG:100_250 with your target name.Method 2 — Upload via VESC Tool over USB
1
Build the firmware
Follow the build steps above. You need the
.bin file from the build/<target>/ directory, for example build/100_250/100_250.bin.2
Connect to your VESC in VESC Tool
Open VESC Tool and connect to your controller over USB.
3
Navigate to the Firmware tab
Select the Firmware tab from the left-side menu.
4
Select the custom firmware file
Click the Custom file tab, then click the folder icon and select the
.bin file you built.5
Upload the firmware
Click the upload button (downward arrow) in the bottom-right corner. The progress bar will advance as the firmware uploads.It is normal for the VESC to disconnect during the upload — do not panic.
6
Wait before disconnecting
Wait 10 seconds after the progress bar completes before removing USB or power. The VESC will disconnect itself once the new firmware is fully written.
If your VESC becomes unresponsive after a failed upload, you will need an STLink SWD debugger to recover it. See Method 1 above.
Optional: Qt Creator IDE
If you prefer a graphical IDE, the repository includes a Qt Creator project:1
Install Python dependencies
2
Install Qt
3
Open the project in Qt Creator
Launch Qt Creator from
tools/Qt/Tools/QtCreator/bin/qtcreator, then open Project/Qt Creator/vesc.pro.The active hardware target is shown at the bottom-left of the IDE panel and can be changed to any supported board.