• Stars
    star
    1,989
  • Rank 22,347 (Top 0.5 %)
  • Language
    C
  • Created over 10 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The VESC motor control firmware

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

Method 1 - Flash it using an STLink SWD debugger

  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

More Repositories

1

vesc_tool

The source code for VESC Tool. See vesc-project.com
C++
648
star
2

bldc-tool

A Qt program to control and debug my BLDC-controller
C++
234
star
3

vesc_bms_fw

The VESC BMS Firmware
C
183
star
4

rise_sdvp

The RISE Self-Driving Model Vehicle Platform
C
118
star
5

bldc_uart_comm_stm32f4_discovery

A project that demonstrates how to communicate between the VESC and a STM32F4 discovery board using UART
C
82
star
6

bldc-bootloader

A bootloader for my custom motor controller. Read more at http://vedder.se/2015/01/vesc-open-source-esc/
C
63
star
7

bldc-logger

A file and video-overlay logger for my BLDC motor controller
C++
49
star
8

nrf51_vesc

BLE-UART bridge for the VESC with packet handling and VESC Tool compatibility
C
48
star
9

SparkSwitch

Active precharce circuit with optional switch input
KiCad Layout
48
star
10

nrf52_vesc

BLE-UART bridge for the VESC with packet handling and VESC Tool compatibility.
C
30
star
11

vesc_express

The source code for the VESC Express
C
26
star
12

nunchuk_rf_hw

Custom PCB for nunchuks
KiCad Layout
23
star
13

QuadcopterSystem

The hardware and software for our quadcopter system
C
22
star
14

vesc_pkg

Official VESC Packages
C
21
star
15

vesc-os-pi

A minimal raspberry pi 3 or 4 image that runs VESC Tool
Shell
19
star
16

vesc_bms_bootloader

Bootloader for the VESC BMS
C
16
star
17

vesc_wand

This is the firmware for the VESC Wand remote control
C
16
star
18

CapPCB

A capacitor PCB for the VESC
KiCad Layout
13
star
19

udp-uart-bridge

UDP to UART bridge for some of my projects
C++
13
star
20

svm_sim

A Space Vector Modulation (SVM) simulator for FOC analysis
C++
12
star
21

nunchuk_mod

The firmware for the mcu of my custom PCB for the wireless nunchuk
C
11
star
22

vesc_fw_archive

VESC Firmware Archive
9
star
23

vesc_gpstm

General purpose STM32G4-codebase that works with VESC Tool
C
9
star
24

summon-arm-toolchain

Build-script for bare metal ARM toolchain - based on esden:s branch
Shell
8
star
25

vesc_braking_resistor

C
7
star
26

display_tool

A simple display graphics editor, mostly useful for the VESC Wand
C++
6
star
27

dwm1001_vesc

VESC Connect for the DWM1001
C
6
star
28

io_board_er

VESC-compatible IO-board
6
star
29

rfboard-chibios

ChibiOS on my RF-boards. Read more at http://vedder.se/2013/04/cc2520-and-stm32-rf-boards/
C
6
star
30

FaultCheck_QuickCheck

The FaultCheck distribution with a QuickCheck example
Makefile
5
star
31

ubx_server

Ubx Server
C++
5
star
32

nrf24l01plus_stm32f100_chibios

NRF24L01+ driver and ChibiOS project for the stm32f100c6t6
C
3
star
33

FaultCheck_ScalaCheck

The FaultCheck tool with ScalaCheck tests and a use case where ScalaCheck is used.
Makefile
1
star