Go to file
Euan Mutch 1d80914a5c
Free mcconf after double pulse test
2024-06-18 11:06:56 +01:00
ChibiOS_3.0.5 Added UART interrupt priority hack 2023-09-24 20:19:12 +02:00
Project
applications Also apply filter and range check to override value 2023-10-31 08:59:46 +01:00
blackmagic Added STM32G4 support to blackmagic 2023-11-23 18:41:07 +01:00
comm Only load imports when flash is valid 2024-01-11 13:36:26 +01:00
documentation Updated CAN-doc 2023-02-03 10:12:12 +01:00
driver Much faster i2c error timeout 2023-10-18 12:45:38 +02:00
encoder Fix encoder reset stat when all is ok 2023-08-28 23:01:19 +02:00
hwconf Free mcconf after double pulse test 2024-06-18 11:06:56 +01:00
imu Add support for A200S V4.1, add alternative DC Cal, expose I2C for LSM6DS3 2023-09-26 10:07:06 +01:00
libcanard Added setting to limit input current with field weakening, added timeout to lbm app adc detach 2023-06-08 04:31:36 +02:00
lispBM Doc tweak 2024-01-22 16:20:42 +01:00
make Support for only polling variables starting with vt 2023-11-06 13:37:19 +01:00
motor Do not allow sampled playback during faults 2023-12-31 19:37:15 +01:00
qmlui
tests Squashed 'lispBM/lispBM/' changes from 2837aa33..7ba933de 2024-01-22 14:54:32 +01:00
util Added crc32 2023-11-02 15:37:58 +01:00
.gdbinit
.gitignore add package folder to gitignore 2023-03-11 04:08:12 -06:00
.travis.yml
CHANGELOG.md Added foc-play-samples 2023-12-31 17:26:15 +01:00
CONTRIBUTING
Makefile supress "Echo off" messages in windows 2022-11-15 13:35:02 -06:00
README.md Squashed 'lispBM/lispBM/' changes from 093a6a88..d005f690 2023-11-22 14:53:49 +01:00
bms.c Added BMS pressure sensor support 2024-01-12 11:53:47 +01:00
bms.h Added send-bms-can 2022-11-10 15:24:34 +01:00
chconf.h
conf_custom.c
conf_custom.h
conf_general.c Allow passive flux linkage measurement 2023-10-08 10:07:11 +02:00
conf_general.h Added foc-play-samples 2023-12-31 17:26:15 +01:00
confgenerator.c New current sampling modes, FOC interpolation support 2023-09-23 14:45:00 +02:00
confgenerator.h New current sampling modes, FOC interpolation support 2023-09-23 14:45:00 +02:00
datatypes.h Added BMS pressure sensor support 2024-01-12 11:53:47 +01:00
events.c
events.h
firmware_metadata.h
flash_helper.c Only load imports when flash is valid 2024-01-11 13:36:26 +01:00
flash_helper.h First attampt at move-to-flash support 2023-04-02 19:10:11 +02:00
halconf.h
irq_handlers.c
isr_vector_table.h
ld_eeprom_emu.ld Large native library refactoring that breaks compatibility with old native libraries 2022-10-03 12:40:02 +02:00
main.c Re-order uart initialization 2023-10-31 09:18:24 +01:00
main.h
package_firmware.py Thor300 firmware - official from Fajdiga 2024-01-01 13:34:16 -08:00
pi_stm32.cfg
stm32-bv_openocd.cfg
terminal.c Fixed lbm current measurement commands, some tweaks and cleanup 2023-02-07 21:40:26 +01:00
terminal.h
timeout.c Made chVTGetSystemTimeX consistent everywhere 2022-12-14 19:48:26 +01:00
timeout.h

README.md

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