No description
  • C 87.6%
  • Common Lisp 3.7%
  • NewLisp 2.3%
  • Assembly 1.3%
  • QML 1%
  • Other 4%
Find a file
2026-05-22 08:49:25 +02:00
applications Minor coasting brake tweak 2026-05-01 13:33:52 +02:00
blackmagic Only push and pop optimization in files where it differs across the file 2025-04-13 09:48:08 +02:00
ChibiOS_3.0.5 Compile with newlib-nano 2025-07-05 16:48:54 +02:00
comm Experimental support for simultaneous VESC CAN and UAVCAN 2026-05-11 19:42:37 +02:00
documentation fix(doc): wrong command id for CAN_PACKET_STATUS_6 2025-05-15 23:22:26 +02:00
driver LSM6DS3 SPI support 2026-05-13 11:35:04 +02:00
encoder Limit angle interpolation 2026-05-18 21:53:45 +02:00
hwconf Switch improvements on VL hardware 2026-05-22 08:49:25 +02:00
imu Correct IMU rotation on maxim and classic 2026-05-20 21:22:35 +02:00
libcanard Experimental support for simultaneous VESC CAN and UAVCAN 2026-05-11 19:42:37 +02:00
lispBM Added field weakening backoff gain parameter 2026-05-11 15:50:12 +02:00
make Started profiling the FOC code, fixed a few minor bottlenecks, also started testing with latest GCC 2025-11-09 19:31:02 +01:00
motor Higher default backoff gain 2026-05-15 17:55:41 +02:00
Project [Qt Creator][Configuration] Don't lowercase the target names 2022-04-15 21:12:59 -04:00
qmlui Collected luna-files in one place, removed some old files 2021-12-31 12:27:36 +01:00
tests Angle interpolation without sin/cos/atan2 and tests for it 2023-03-21 13:25:31 +01:00
util Hall sensor remapping support 2026-04-19 17:35:13 +02:00
.clangd add clangd configuration and gitignore entry for it 2026-02-28 19:34:15 +01:00
.gdbinit gdb: Added command to dump entire stm32 flash to bin file. 2022-02-10 14:38:32 +01:00
.gitignore add clangd configuration and gitignore entry for it 2026-02-28 19:34:15 +01:00
.travis.yml Increase traveis build coverage to most hardware versions 2019-01-31 20:59:10 -03:00
bms.c Changed BMS limit tolerance 2025-07-10 12:36:02 +02:00
bms.h Added send-bms-can 2022-11-10 15:24:34 +01:00
CHANGELOG.md Release 7.00 2026-05-15 17:55:57 +02:00
chconf.h Stop motor and reset on system halt 2025-03-27 23:21:57 +01:00
conf_custom.c Added cache support 2024-03-10 12:56:27 +01:00
conf_custom.h Added cache support 2024-03-10 12:56:27 +01:00
conf_general.c Added filter delay compensation for sin/cos encoder 2025-11-03 18:32:47 +01:00
conf_general.h Release 7.00 2026-05-15 17:55:57 +02:00
confgenerator.c Added field weakening backoff gain parameter 2026-05-11 15:50:12 +02:00
confgenerator.h Experimental support for simultaneous VESC CAN and UAVCAN 2026-05-11 19:42:37 +02:00
CONTRIBUTING Correct spelling, broken links, and missing parameters in documentation 2021-05-07 15:27:50 -07:00
datatypes.h Experimental support for simultaneous VESC CAN and UAVCAN 2026-05-11 19:42:37 +02:00
events.c [Utils] Update the header includes 2022-03-23 20:25:37 -04:00
events.h Added event logging 2021-06-15 12:56:38 +02:00
firmware_metadata.h Added fwinfo terminal command 2022-03-07 15:39:37 +01:00
flash_helper.c Changed order of operations and some other improvements for more robust image state saving 2025-06-19 13:30:29 +02:00
flash_helper.h Towards lbm image support 2025-04-11 12:32:25 +02:00
halconf.h Adding support for the AS5x47U encoder. 2022-07-18 14:25:03 -06:00
irq_handlers.c Stop motor and reset on system halt 2025-03-27 23:21:57 +01:00
isr_vector_table.h Ported to ChibiOS 3, refactoring, cleanup, added safe start delay after fault for PPM app, removed unused ST libraries 2015-10-08 23:09:39 +02:00
ld_eeprom_emu.ld Calculate sizes correctly in linkerscript, move some functions into unused space in first flash page to conserve space 2025-04-13 09:26:14 +02:00
main.c Reset config and erase scripts of hall2 and swclk are connected at boot 2026-04-08 15:37:32 +02:00
main.h Stop motor and reset on system halt 2025-03-27 23:21:57 +01:00
Makefile Added lbm and qml read and erase targets 2025-06-19 14:39:54 +02:00
package_firmware.py Added phase shunt maxim 2026-05-18 19:09:29 +02:00
pi_stm32.cfg Removed software servo driver, fixed hw servo driver to work with all hardwares 2018-02-28 10:22:25 +01:00
README.md Removed extra line 2022-12-28 13:13:52 +01:00
stm32-bv_openocd.cfg first commit 2014-01-09 15:20:26 +01:00
terminal.c Added 'stop' terminal command 2026-03-24 09:11:54 -07:00
terminal.h First lisp integration with vesc tool and enabled lisp by default 2022-01-29 03:36:34 +01:00
timeout.c Added set-kill-sw extension 2025-06-21 21:22:54 +02:00
timeout.h Added set-kill-sw extension 2025-06-21 21:22:54 +02:00

VESC firmware

License: GPL v3 Travis CI Status Codacy Badge Contributors Watchers Stars Forks

An open source motor controller firmware.

This is the source code for the VESC DC/BLDC/FOC controller. Read more at https://vesc-project.com/

Supported boards

All of them!

Check the supported boards by typing make

[Firmware]
     fw   - Build firmware for default target
                            supported boards are: 100_250 100_250_no_limits 100_500...

There are also many other options that can be changed in conf_general.h.

Prerequisites

On Ubuntu (Linux)/macOS

  • Tools: git, wget, and make
  • Additional Linux requirements: libgl-dev and libxcb-xinerama0
  • Helpful Ubuntu commands:
sudo apt install git build-essential libgl-dev libxcb-xinerama0 wget git-gui
  • Helpful macOS tools:
brew install stlink
brew install openocd

On Windows

Install Dev environment and build

On Ubuntu (Linux)/MacOS

Open up a terminal

  1. git clone http://github.com/vedderb/bldc.git
  2. cd bldc
  3. Continue with On all platforms

On Windows

  1. Open up a Windows Powershell terminal (Resist the urge to run Powershell as administrator, that will break things)
  2. Type choco install make
  3. git clone http://github.com/vedderb/bldc
  4. cd bldc
  5. Continue with On all platforms

On all platforms

  1. git checkout origin/master
  2. make arm_sdk_install
  3. make <-- Pick out the name of your target device from the supported boards list. For instance, I have a Trampa VESC 100/250, so my target is 100_250
  4. make 100_250 <-- This will build the VESC 100/250 firmware and place it into the bldc/builds/100_250/ directory

Other tools

Linux Optional - Add udev rules to use the stlink v2 programmer without being root

wget vedder.se/Temp/49-stlinkv2.rules
sudo mv 49-stlinkv2.rules /etc/udev/rules.d/
sudo udevadm trigger

IDE

Prerequisites

On macOS/Linux

  • python3, and pip

On Windows

All platforms

  1. pip install aqtinstall
  2. make qt_install
  3. Open Qt Creator IDE installed in tools/Qt/Tools/QtCreator/bin/qtcreator
  4. With Qt Creator, open the vesc firmware Qt Creator project, named vesc.pro. You will find it in Project/Qt Creator/vesc.pro
  5. The IDE is configured by default to build 100_250 firmware, this can be changed in the bottom of the left panel, there you will find all hardware variants supported by VESC

Upload to VESC

  1. Build and flash the bootloader first
  2. Then _flash to the target of your choice. So for instance, for the VESC 100/250:
make 100_250_flash

Method 2 - Upload Firmware via VESC tool through USB

  1. Clone and build the firmware in .bin format as in the above Build instructions

In VESC tool

  1. Connect to the VESC
  2. Navigate to the Firmware tab on the left side menu
  3. Click on Custom file tab
  4. Click on the folder icon to select the built firmware in .bin format (e.g. build/100_250/100_250.bin)
[ Reminder : It is normal to see VESC disconnects during the firmware upload process ]
[ Warning : DO NOT DISCONNECT POWER/USB to VESC during the upload process, or you will risk bricking your VESC ]
[ Warning : ONLY DISCONNECT your VESC 10s after the upload loading bar completed and "FW Upload DONE" ]
  1. Press the upload firmware button (downward arrow) on the bottom right to start upload the selected firmware.
  2. Wait for 10s after the loading bar completed (Warning: unplug sooner will risk bricking your VESC)
  3. The VESC will disconnect itself after new firmware is uploaded.

In case you bricked your VESC

you will need to upload a new working firmware to the VESC.
However, to upload a firmware to a bricked VESC, you have to use a SWD Debugger.

Contribute

Head to the forums to get involved and improve this project. Join the Discord for real-time support and chat

Tags

Every firmware release has a tag. They are created as follows:

git tag -a [version] [commit] -m "VESC Firmware Version [version]"
git push --tags

License

The software is released under the GNU General Public License version 3.0