This thread is simply a straight forward tutorial on how to install the boot loader onto a VESC. I’m using a Maytech VESC for this, but it should work for any VESC that does not have a boot loader installed. All sources and credits are at the end of this thread.
Purchase a ST-Link V2 Like THIS one. They only cost about $5. Your also going to want to buy a 6-pin JST-PH 2mm male header for connecting to the VESC like THIS one. You may also need some female to female jumper cables like THESE.
Once all the parts from step 1 have arrived connect the JST and ST-Link together like in the image below. Green JST wire to 3.3v, Orange to SWCLK, Yellow to GND, White to SWDIO, and Red to RST the black wire can just be trimmed off or left alone.
Now that you’ve connected the ST Link and JST plug it into your VESC port like in the pic below. Then plug the ST Link into a USB port in your computer running Windows. I used Windows 7 though it works with 8 and probably Win 10 as well. Also during this entire process of installing the boot loader the VESC does NOT need to be externally powered.
Next download the STM32 ST-LINK utility from HERE. After you download that run and install the .exe to install the drivers and ST Link Utility itself. Next open the ST-Link Utility, there should be a desktop icon, and click Target Connect. at this point a a large list of address should show up and that means you’ve connected properly.
Download the VESC bootloader from **THIS link. Unzip it and there should be a file inside called “BLDC_4_Bootloader” thats the file we need. Next go back to ST Link and click Open File from the top left button. Navigate to the BLDC_4_Bootloader.hex file and click open. Next click Program Verify, the button just below Target then click Start, this may take a few seconds or a few minutes so just give it some time. Once its done verifying you can close the ST Link Utility and you’ve successfully installed the boot loader! Now just unplug the ST Link power the VESC and upload your firmware as usual!
Thanks to the people on THIS thread as its how I figured out how to do this. Big thanks to Esk8 Support, or Jacob and his video HERE because this thread is pretty much just a transcription of that lol.
**Thanks @TarzanHBK for the link to the .hex file as I could not have found it otherwise!