Go to file
Benjamin Vedder e296897186 Added sleep documentation 2023-02-28 16:18:53 +01:00
ChibiOS_3.0.5 fix issue #557 2022-11-28 08:23:56 -08:00
Project [Qt Creator][Configuration] Don't lowercase the target names 2022-04-15 21:12:59 -04:00
applications PPM detach fix and other tweaks 2023-02-02 14:03:43 +01:00
blackmagic Add new nRF51822 ID code for SWD connection 2022-10-21 10:55:46 -03:00
comm Fixed can repl command 2023-02-23 20:33:25 +01:00
documentation Updated CAN-doc 2023-02-03 10:12:12 +01:00
driver Lisp ICU support 2023-01-09 19:31:31 +01:00
encoder typo fix for custom encoder read callback 2023-02-15 11:24:04 +11:00
hwconf Added mk6_max hardware 2023-02-16 09:00:49 +01:00
imu Made chVTGetSystemTimeX consistent everywhere 2022-12-14 19:48:26 +01:00
libcanard Dual motor temp sensor fix 2022-09-06 12:24:55 +02:00
lispBM Added sleep documentation 2023-02-28 16:18:53 +01:00
make Changed back main stack size 2022-11-16 12:00:47 +01:00
motor Fixed lbm current measurement commands, some tweaks and cleanup 2023-02-07 21:40:26 +01:00
qmlui Collected luna-files in one place, removed some old files 2021-12-31 12:27:36 +01:00
tests Squashed 'lispBM/lispBM/' changes from 20e97c4b..07baa883 2023-02-18 10:54:32 +01:00
util Updated to latest lbm 2023-01-24 11:15:12 +01:00
.gdbinit gdb: Added command to dump entire stm32 flash to bin file. 2022-02-10 14:38:32 +01:00
.gitignore ignore vscode settings folder 2022-04-07 02:05:12 -05:00
.travis.yml
CHANGELOG.md Lisp ICU support 2023-01-09 19:31:31 +01:00
CONTRIBUTING Correct spelling, broken links, and missing parameters in documentation 2021-05-07 15:27:50 -07:00
Makefile supress "Echo off" messages in windows 2022-11-15 13:35:02 -06:00
README.md Removed extra line 2022-12-28 13:13:52 +01:00
bms.c System time overflow fix 2022-12-14 19:47:01 +01:00
bms.h Added send-bms-can 2022-11-10 15:24:34 +01:00
chconf.h Added stack checks 2022-01-17 22:15:48 +01:00
conf_custom.c Lisp code streaming, more native functions and checks, custom config support, moved global send buffer to mempools 2022-09-18 22:47:50 +02:00
conf_custom.h Lisp code streaming, more native functions and checks, custom config support, moved global send buffer to mempools 2022-09-18 22:47:50 +02:00
conf_general.c Flux linkage measurement tweaks 2022-12-04 14:21:15 +01:00
conf_general.h Incremented beta number 2023-02-18 11:07:10 +01:00
confgenerator.c WIP adding sin/cos phase error compensation 2022-12-01 15:50:27 +01:00
confgenerator.h WIP adding sin/cos phase error compensation 2022-12-01 15:50:27 +01:00
datatypes.h WIP adding sin/cos phase error compensation 2022-12-01 15:50:27 +01: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 Cleanup 2023-01-09 12:08:25 +01:00
flash_helper.h switches prefix of interface functions from "if_" to "flash_helper_" 2023-01-09 10:14:05 +01:00
halconf.h Adding support for the AS5x47U encoder. 2022-07-18 14:25:03 -06:00
irq_handlers.c First round of cleanup 2022-02-19 18:51:34 +01:00
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 Clean PPM in wizard. Temperature comp for HSI. 2022-11-17 22:32:59 +00:00
main.h Dual motor shutdown fix 2021-08-20 14:59:36 +02:00
package_firmware.py Added mk6_max hardware 2023-02-16 09:00:49 +01: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 First lisp integration with vesc tool and enabled lisp by default 2022-01-29 03:36:34 +01:00
timeout.c Made chVTGetSystemTimeX consistent everywhere 2022-12-14 19:48:26 +01:00
timeout.h Added HFI-method based on coupling between the axes 2022-04-06 00:35:11 +02:00

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