10 June 2018 / by LI Tao
This thread is simply a straight forward tutorial on how to install firmware onto a VESC. I have bought a clone of VESC6 on taobao/aliexpress, but it should work for any VESC that does not have firmware installed.
Purchase a ST-Link V2 and a 6-pin JST-PH 2mm female header and cables, i have soldered a micro-jst cable, connect the JST and ST-Link together like in the image below.
Plug the ST Link into a USB port of my MacBook Pro. The NiMH/LiPo Battery is NOT connected during the entire process of flashing firmware.
Downloading ARM GCC and installing openocd
Mac OS X 64-bit File:gcc-arm-none-eabi-6-2017-q1-update-mac.tar.bz2
brew install openocd tar -xvjf gcc-arm-none-eabi-7-2017-q4-major-mac.tar.bz2 -C ~ export PATH=~/gcc-arm-none-eabi-7-2017-q4-major/bin:$PATH
DOWNLOAD, COMPILE AND UPLOAD THE FIRMWARE
First, connect a programmer as described in this post. Then, download the latest firmware from github, compile and upload it:
git clone https://github.com/vedderb/bldc.git
cd bldc touch conf_general.h make -j8 build_args="-DHW_VERSION_60" make upload
cd bldc touch conf_general.h make -j8 build_args="-DSERVO_OUT_ENABLE=1 -DHW_VERSION_60" make upload
If you want to skip downloading and compiling the bootloader and firmware from sources I prepared prebuilt images. You can download these VESC_default.bin VESC_servoout.bin and skip to the flashing section of this post.