Go to file
Benjamin Vedder 582bdc7080 Speed PID update to work better with propellers 2022-05-31 15:28:06 +02:00
ChibiOS_3.0.5 [Make] use proper powershell script block formatting. 2022-03-21 08:12:57 -04:00
Project [Project][Qt Creator] Point project kit toward `qt_creator_configure` kit 2022-03-02 16:56:18 -05:00
applications Merge branch 'master' into balanceapp_cascading_pid 2022-05-15 11:01:30 -07:00
blackmagic Fix blackmagic.mk line termination 2022-02-19 11:55:11 +07:00
comm Changed timeout reset behavior for detect modes 2022-05-17 12:19:44 +02:00
driver Removed old mk-file 2022-05-15 12:24:37 +02:00
encoder [Utils] Update the header includes 2022-03-23 20:25:37 -04:00
hwconf Merge pull request #501 from surfdado/little_focer_v3_1 2022-05-30 16:13:53 +02:00
imu Added support for TR-C variant of LSM6DS3 IMU 2022-05-24 10:18:23 -07:00
libcanard Added uavcan ctl_dir parameter 2022-05-17 14:14:08 +02:00
lispBM Added abstract IO-interface 2022-05-13 11:07:11 +02:00
make Moved nrf to driver 2022-05-15 12:24:02 +02:00
motor Speed PID update to work better with propellers 2022-05-31 15:28:06 +02:00
qmlui Collected luna-files in one place, removed some old files 2021-12-31 12:27:36 +01:00
tests Orginized files 2022-05-15 11:55:34 +02:00
util Orginized files 2022-05-15 11:55:34 +02: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 Increase traveis build coverage to most hardware versions 2019-01-31 20:59:10 -03:00
CHANGELOG Observers, observers, observers 2022-05-21 22:54:12 +02:00
CONTRIBUTING Correct spelling, broken links, and missing parameters in documentation 2021-05-07 15:27:50 -07:00
Makefile [Utils][Unit test] Point the unit test toward the new math_utils.c/.h 2022-03-23 20:25:37 -04:00
README.md [Readme][Windows] Fix typo 2022-03-14 07:34:03 -04:00
bms.c [Utils] Update the header includes 2022-03-23 20:25:37 -04:00
bms.h Added BMS module 2020-10-22 08:32:51 +02:00
chconf.h Added stack checks 2022-01-17 22:15:48 +01:00
conf_general.c Send back app and mc config to requester port 2022-05-10 13:27:09 +02:00
conf_general.h Speed PID update to work better with propellers 2022-05-31 15:28:06 +02:00
confgenerator.c Added saturation compensation modes 2022-05-23 14:42:42 +02:00
confgenerator.h Added saturation compensation modes 2022-05-23 14:42:42 +02:00
datatypes.h Added saturation compensation modes 2022-05-23 14:42:42 +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 Added stop function 2022-05-10 19:05:43 +02:00
flash_helper.h Updated linker script and flash helpers to get 128k extra code space. Note that this requires the updated bootloader with compression support. 2022-01-18 20:31:24 +01:00
halconf.h FW 3.66: Many changes, see changelog 2020-01-12 21:25:21 +01:00
irq_handlers.c First round of cleanup 2022-02-19 18:51:34 +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 C library thread support, more functions and examples 2022-05-11 22:10:42 +02:00
main.c Added ST lib support to c libraries, updated examples, added WS2812-example 2022-05-12 16:06:24 +02:00
main.h Dual motor shutdown fix 2021-08-20 14:59:36 +02:00
package_firmware.py Support for Little FOCer V3 and V3.1 2022-05-24 10:18:23 -07: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
stm32-bv_openocd.cfg first commit 2014-01-09 15:20:26 +01:00
terminal.c Added optional fault info string and implemented it for the phase filter fault 2022-05-06 00:49:35 +02: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 HFI-method based on coupling between the axes 2022-04-06 00:35:11 +02: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

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

License

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