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/
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.
- Tools:
git
,wget
, andmake
- Additional Linux requirements:
libgl-dev
andlibxcb-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
- Chocolately: https://chocolatey.org/install
- Git: https://git-scm.com/download/win. Make sure to click any boxes to add Git to your Environment (aka PATH)
Open up a terminal
git clone http://github.com/vedderb/bldc.git
cd bldc
- Continue with On all platforms
- Open up a Windows Powershell terminal (Resist the urge to run Powershell as administrator, that will break things)
- Type
choco install make
git clone http://github.com/vedderb/bldc
cd bldc
- Continue with On all platforms
git checkout origin/master
make arm_sdk_install
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 is100_250
make 100_250
<-- This will build the VESC 100/250 firmware and place it into thebldc/builds/100_250/
directory
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
python3
, andpip
- Python 3: https://www.python.org/downloads/. Make sure to click the box to add Python3 to your Environment.
pip install aqtinstall
make qt_install
- Build and flash the bootloader first
- Then
_flash
to the target of your choice. So for instance, for the VESC 100/250:
make 100_250_flash
- Clone and build the firmware in .bin format as in the above Build instructions
In VESC tool
- Connect to the VESC
- Navigate to the Firmware tab on the left side menu
- Click on Custom file tab
- Click on the folder icon to select the built firmware in .bin format (e.g.
build/100_250/100_250.bin
)
[ 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" ]
- Press the upload firmware button (downward arrow) on the bottom right to start upload the selected firmware.
- Wait for 10s after the loading bar completed (Warning: unplug sooner will risk bricking your VESC)
- The VESC will disconnect itself after new firmware is uploaded.
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.
Head to the forums to get involved and improve this project. Join the Discord for real-time support and chat
The software is released under the GNU General Public License version 3.0