VESC - Installing a bootloader

If you have a VESC with a firmware already installed you can flash the bootloader from VescTool. If somehow you accidentally removed the firmware from the device you’ll need the STLink to recover it.

I had the misfortune to have used a bad USB cable and broke my firmware during a config upgrade on my FOCBOX. In case that happens, you have to use the STLink tool to flash any firmware (I used 2.18 firmware file) back to the device. I don’t have the instructions for that nearby, but if needed I can go look them up :slight_smile:

TLDR; if there’s a firmware on there you can flash bootloader via VescTool.

2 Likes

Thanks Jamy! That sounds pretty simple then. SO the VESC TOOL will have the latest firmware automatically on it or do I need to direct it to somewhere?

Vesc_tool will have the latest 3.XX firmware. I’m not sure if that’s compatible with Metr, but if it isn’t you can always downgrade :slight_smile:

1 Like

I think it is. SO just to confirm… My Vesc absolutley does not currently have a Bootloader on it. So, with VESC TOOL, this doesnt matter? The tool puts a bootloader on it or acts as the boot loader?

Vesc tool will ask you if you want to install a bootloader when you connect it :slight_smile:

1 Like

Cheers man! Ill give it a go and it it goes tits up, the STLink is in the mail.

Hey Jamy, so what was yours wiring diagram to the Fox ? Did you use the 3.3v ? Or just Rst Swdio Swclk & Gnd ? Thanks for your help :v:

It’s all back in my Raptor 2, but I got a picture here. I soldered to each of the pins above the cap (which was a pain in the ass because there was solder already in there…

The ground pin was the worst so I just connected elsewhere to ground.

So, tldr; connect to: RST, DTO, GND, CLK, 3.3

1 Like

:+1: Perfect ! Thank you, treenutter and JdogAwesome a lot guys :wink:

1 Like

Hi All, does anyone can share the link of the bootlaoder file for VESC 6? thanks.

1 Like

Bump @JohnnyMeduse have vesc 6 bootloader hex you can post?

Hummmm… I don’t have it… I usually program them with the bootloader from the 4 and upgrade them after :crazy_face:

1 Like

Lol ok…if that works, I’m good

Ok a little heads up for anybody that get stuck in the blue light only situation where you have corrupted or no firmware/bootloader.

Just flash the corresponding vesc_default.bin for your vesc version using stlink, then you can connect with VESC Tool and flash bootloader, change firmware etc

1 Like

Anybody tried uploading bootloader/firmware with vesc tool? I’m having mixed results…

1 Like

Yes! I did with my maytech vesc. Was super easy, vesctool did all the work, no need for st-link.

Im getting the blue light only on my VESC. I am unable to upload anything onto the VESC using the STlink via Ubuntu. Any other ideas?

Another bump…

Did you find the bootloader or did you do what johnny did and upgrade it in the VESC tool?

This must be what I am looking for?

https://github.com/vedderb/vesc_tool/blob/master/res/firmwares/60/VESC_default.bin

@Blasto I connected everything but the 3.3V and I can’t connect the FocBox via ST-Link. Should I power the FocBox to be able to connect? or should I connect 3.3V pin from ST-Link to 3.3V pin from FocBox?