Go to file
Mitch Lustig 5d3f829e69 Fix conf gen 2019-09-10 01:38:03 -07:00
ChibiOS_3.0.2 Remove ST CRC library but keep using hardware-accelerated CRC32. 2019-04-16 19:13:01 -03:00
appconf Add support for dual fault switches 2019-09-10 01:07:05 -07:00
applications Add support for dual fault switches 2019-09-10 01:07:05 -07:00
blackmagic FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
build_all MPU9x50 fix, experiment plots, DQ voltage RT data, smart reverse for nunchuk app 2019-09-08 18:25:38 +02:00
hwconf FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
imu Make axes configurable, remove offset management 2019-09-08 18:32:53 -07:00
libcanard Major 2019 update 2019-02-18 19:30:19 +01:00
mcconf Rename sin/cos m_conf structure fields 2019-04-08 21:05:46 -03:00
nrf FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
tests/packet_recovery Major 2019 update 2019-02-18 19:30:19 +01:00
.gitignore Add gitigore 2015-10-08 17:51:21 +02:00
.travis.yml Increase traveis build coverage to most hardware versions 2019-01-31 20:59:10 -03:00
CHANGELOG MPU9x50 fix, experiment plots, DQ voltage RT data, smart reverse for nunchuk app 2019-09-08 18:25:38 +02:00
CONTRIBUTING Major 2019 update 2019-02-18 19:30:19 +01:00
Makefile FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
README.md Axiom control board support 2019-04-27 08:21:46 -03:00
board.c FW3.28: dual throttle curves, ntc beta factor config, board file added 2017-09-06 21:13:28 +02:00
board.h FW3.28: dual throttle curves, ntc beta factor config, board file added 2017-09-06 21:13:28 +02:00
buffer.c Shifting signed 32-bit value by 31 bits is undefined behaviour 2019-01-25 00:09:08 -03:00
buffer.h FW 3.7 2016-11-04 15:18:34 +01:00
chconf.h FW 2.3: MAJOR UPDATE: FOC!! 2015-12-08 21:01:23 +01:00
comm_can.c Added CAN status msg 5, fixed issue 94, use defaul HW parameters after autodetect 2019-05-16 23:30:40 +02:00
comm_can.h Added CAN status msg 5, fixed issue 94, use defaul HW parameters after autodetect 2019-05-16 23:30:40 +02:00
comm_usb.c Commands restructuring for thread safety, 75/300 vreg fix, fixed relative current commands 2019-03-04 19:23:38 +01:00
comm_usb.h Major 2019 update 2019-02-18 19:30:19 +01:00
comm_usb_serial.c FW3.28: dual throttle curves, ntc beta factor config, board file added 2017-09-06 21:13:28 +02:00
comm_usb_serial.h FW 3.7 2016-11-04 15:18:34 +01:00
commands.c Add support for dual fault switches 2019-09-10 01:07:05 -07:00
commands.h MPU9x50 fix, experiment plots, DQ voltage RT data, smart reverse for nunchuk app 2019-09-08 18:25:38 +02:00
conf_general.c FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
conf_general.h MPU9x50 fix, experiment plots, DQ voltage RT data, smart reverse for nunchuk app 2019-09-08 18:25:38 +02:00
confgenerator.c Fix conf gen 2019-09-10 01:38:03 -07:00
confgenerator.h Fix conf gen 2019-09-10 01:38:03 -07:00
crc.c Fixed flash CRC check 2019-04-18 22:30:01 +02:00
crc.h Remove ST CRC library but keep using hardware-accelerated CRC32. 2019-04-16 19:13:01 -03:00
datatypes.h Add support for dual fault switches 2019-09-10 01:07:05 -07:00
digital_filter.c FW 3.7 2016-11-04 15:18:34 +01:00
digital_filter.h FW 3.7 2016-11-04 15:18:34 +01:00
eeprom.c Do not write flash memory if MCU VDD is below 2.9V 2019-01-10 11:14:00 -03:00
eeprom.h Added support for storing hw-specific and custom variables in EEPROM 2019-04-19 10:42:43 +02:00
encoder.c FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
encoder.h Add SinCos encoder checks and fault management 2019-04-02 10:37:15 -03:00
flash_helper.c FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
flash_helper.h FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
gpdrive.c 75/300 R2 support, terminal sync cmd, IMU support, option to disable permanent UART, collected timer functions in one place 2019-03-10 14:57:42 +01:00
gpdrive.h Major 2019 update 2019-02-18 19:30:19 +01:00
halconf.h Major 2019 update 2019-02-18 19:30:19 +01:00
i2c_bb.c Fixed current offset fault bug, added support for multiple IMUs and ICM-20948 2019-05-03 19:55:36 +02:00
i2c_bb.h Fixed current offset fault bug, added support for multiple IMUs and ICM-20948 2019-05-03 19:55:36 +02:00
irq_handlers.c Some fixes after the merge 2019-02-19 18:55:18 +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 Fixed flash CRC check 2019-04-18 22:30:01 +02:00
led_external.c Fix shadowed variables. Add -Wshadow. 2019-01-28 16:52:02 -03:00
led_external.h FW 3.7 2016-11-04 15:18:34 +01:00
ledpwm.c FW 3.7 2016-11-04 15:18:34 +01:00
ledpwm.h FW 3.7 2016-11-04 15:18:34 +01:00
main.c FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
mc_interface.c MPU9x50 fix, experiment plots, DQ voltage RT data, smart reverse for nunchuk app 2019-09-08 18:25:38 +02:00
mc_interface.h MPU9x50 fix, experiment plots, DQ voltage RT data, smart reverse for nunchuk app 2019-09-08 18:25:38 +02:00
mcpwm.c 75/300 R2 support, terminal sync cmd, IMU support, option to disable permanent UART, collected timer functions in one place 2019-03-10 14:57:42 +01:00
mcpwm.h Major 2019 update 2019-02-18 19:30:19 +01:00
mcpwm_foc.c MPU9x50 fix, experiment plots, DQ voltage RT data, smart reverse for nunchuk app 2019-09-08 18:25:38 +02:00
mcpwm_foc.h FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
mcuconf.h Resolve merge conficts with major 2019 release 2019-02-18 20:25:52 -03:00
packet.c Major 2019 update 2019-02-18 19:30:19 +01:00
packet.h Major 2019 update 2019-02-18 19:30:19 +01: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
servo_dec.c Detect FOC fix, adc brake multi fix, make ppm pulses invalid above 150 percent 2019-07-01 17:17:49 +02:00
servo_dec.h FW 3.7 2016-11-04 15:18:34 +01:00
servo_simple.c Removed software servo driver, fixed hw servo driver to work with all hardwares 2018-02-28 10:22:25 +01:00
servo_simple.h FW 3.7 2016-11-04 15:18:34 +01:00
shutdown.c FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
shutdown.h FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
stm32-bv_openocd.cfg first commit 2014-01-09 15:20:26 +01:00
stm32f4xx_conf.h Restore capability of enabling parameter assertion of peripheral libraries 2019-01-28 16:47:10 -03:00
terminal.c FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
terminal.h FW3.59. Many updates, see changelog for details 2019-09-03 20:39:05 +02:00
timeout.c Autogenerated config parsing with signatures, fixed previous PRs 2019-03-01 21:36:58 +01:00
timeout.h Extend watchdog coverage with IWDG, a watchdog running from an independent LF oscillator. If any of the threads being monitored does not report for more than 12ms, a reset will be asserted. When a WDG reset happens, the user can see it in the fault logs from vesc tool 2019-01-24 12:19:44 -03:00
timer.c 75/300 R2 support, terminal sync cmd, IMU support, option to disable permanent UART, collected timer functions in one place 2019-03-10 14:57:42 +01:00
timer.h 75/300 R2 support, terminal sync cmd, IMU support, option to disable permanent UART, collected timer functions in one place 2019-03-10 14:57:42 +01:00
utils.c Major 2019 update 2019-02-18 19:30:19 +01:00
utils.h Resolve merge conficts with major 2019 release 2019-02-18 20:25:52 -03:00
virtual_motor.c Merge pull request #90 from powerdesigns/virtual-motor-update 2019-05-04 10:48:47 +02:00
virtual_motor.h Add command to connect a virtual motor with configurable parameters 2019-04-06 10:36:00 -03:00
ws2811.c Fix shadowed variables. Add -Wshadow. 2019-01-28 16:52:02 -03:00
ws2811.h FW 3.7 2016-11-04 15:18:34 +01: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!

Make sure you select your board in conf_general.h

//#define HW_SOURCE "hw_40.c"
//#define HW_HEADER "hw_40.h"

//#define HW_SOURCE "hw_45.c"
//#define HW_HEADER "hw_45.h"

//#define HW_SOURCE "hw_46.c" // Also for 4.7
//#define HW_HEADER "hw_46.h" // Also for 4.7

//#define HW_SOURCE "hw_48.c"
//#define HW_HEADER "hw_48.h"

//#define HW_SOURCE "hw_49.c"
//#define HW_HEADER "hw_49.h"

//#define HW_SOURCE "hw_410.c" // Also for 4.11 and 4.12
//#define HW_HEADER "hw_410.h" // Also for 4.11 and 4.12

#define HW_SOURCE "hw_60.c"
#define HW_HEADER "hw_60.h"

//#define HW_SOURCE "hw_r2.c"
//#define HW_HEADER "hw_r2.h"

//#define HW_SOURCE "hw_victor_r1a.c"
//#define HW_HEADER "hw_victor_r1a.h"

//#define HW_SOURCE "hw_das_rs.c"
//#define HW_HEADER "hw_das_rs.h"

//#define HW_SOURCE "hw_axiom.c"
//#define HW_HEADER "hw_axiom.h"

//#define HW_SOURCE "hw_rh.c"
//#define HW_HEADER "hw_rh.h"

//#define HW_SOURCE "hw_tp.c"
//#define HW_HEADER "hw_tp.h"

//#define HW_SOURCE "hw_75_300.c"
//#define HW_HEADER "hw_75_300.h"

//#define HW_SOURCE "hw_mini4.c"
//#define HW_HEADER "hw_mini4.h"

//#define HW_SOURCE "hw_das_mini.c"
//#define HW_HEADER "hw_das_mini.h"

//#define HW_SOURCE "hw_uavc_qcube.c"
//#define HW_HEADER "hw_uavc_qcube.h"

//#define HW_SOURCE "hw_uavc_basic.c"
//#define HW_HEADER "hw_uavc_basic.h"

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

Prerequisites

On an Ubuntu machine, install the gcc-arm-embedded toolchain

sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
sudo apt update
sudo apt install gcc-arm-embedded

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

Build and flash the bootloader

Build

Clone and build the firmware

git clone https://github.com/vedderb/bldc.git vesc_firmware
cd vesc_firmware
make

Flash it using an STLink SWD debugger

make upload

Contribute

Head to the forums to get involved and improve this project.

License

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