VESC - Installing a bootloader

Thanks @chaka ; I’m also wondering a bit about the integrity of the connections I’ve made using the jumper cables with the tips lopped off… although that usually works.

Those connections should be fine if you can feel some resistance when plugging them in.

Did you get a chance to run the programmer again with the connectors moved?

@chaka I did and it worked! Boot loader and updated firmware installed! I’ll post pics and a summary tomorrow. Thanks so much for taking a close look at my programmer! I tested FOC in my living room tonight. It’s so good!

@treenutter I would really appreciate a brief recap and maybe a schematic. Thanks to @Jack I’ll be building a couple VESC’s myself soon and uploading the bootloader will be part of the process.

@trbt555 you just need to prepare de proper hardware and follow vedder’s steps

You can get the discovery board, include it in your digikey or mouser BOM

http://www.digikey.ca/product-detail/en/STM32F0308-DISCO/497-13893-ND/4310127

http://ca.mouser.com/Search/m_ProductDetail.aspx?STMicroelectronics%2FSTM32F0308-DISCO%2F&qs=%2Fha2pyFadui%2F2iC6LF3Xs1YfU5RtwxMrvqllDc2BnH2%2bYWiSlRTdmw%3D%3D

The connection to the vesc are straight

Jst ph 6 pin mate http://www.digikey.ca/product-detail/en/06KR-D6S-P/455-2674-ND/2797509

@trbt555 I think that @Blasto is right; it’s all pretty straightforward unless you have a weird STLINK like I did that has an unusual naming convention for the pins… then you need an expert like @chaka to save the day and translate the pin titles for you! Thanks again @chaka and @elkick!

Here are some pics of the successful process, starting with the connection from the STLINK to the VESC (this time using a pad to reduce the risk of shorts):

Run all of vender’s command lines and you’ll get these two screens when you finally upload the firmware and the bootloader.

Firmware Success!:

Bootloader Success!:

Here’s the VESC with it’s LEDs blinking during\after the programming:

And finally, screens from the Linux version of BLDC Tool:

FTW, the FOC config screen!

A quick review of FOC: Holy crap I love it! I could only test it in the living room, but it is dead silent and starts without any stutter using an unsensored motor! It’s a vast improvement over the previous motor control process, at least at slow speeds and startup. Configuration of it was easier than I thought it would be… I just clicked the buttons, let the motor do it’s thing, and then applied the settings to save them. I can’t wait to get it out on the road!

The discovery board was too expensive for me! This ST-Link V2 works perfectly.

HOLY CRAP !!! All this VESC installation is freaking me out !!,… . special wire connecting , …downloading,… programming !

I have nt recieved it yet,…but i suck with computers and im wondering if i will ever get that VESC to work ???

haha this is all “extra” stuff; I wouldn’t worry about any of it.

All you need is the BLDC tool: it can be on mac or windows, and is just an application used to set up the VESC. Plug a USB cable into your VESC, open the application, and you are halfway there!

If you want to check out more info, I suggest the VESC faq section. It may seem daunting at first, but realize that if you just want to set up your VESC and then leave it alone, only a couple threads will even be helpful- a lot of them are for more complicated things that you won’t need to worry about.

Trust me: I held out on the VESC for so long because I thought it was too complicated… once I finally bought one, it took me less than an hour to download the application, set up the VESC, and get my board up and running.

When in doubt, just ask!

1 Like

@Randyc1 pls note that this thread was written about a problem that very few people have. Any VESC you buy now will have a bootloader installed already and you don’t need to do anything described here.

2 Likes

Allright Guys , …thanks for reassuring me !

I’ve had a problem just getting my bldc tool to read my firmware on windows, having Linux or Ubuntu installed tomorrow when I get free time. Haven’t really seen my issues, blue light when plugged in then three red lights flash only once on power up then goes to green light and my bldc tool never picks up firmware

Okay, because I bought an alien VESC without releasing that is has no bootloader, so I need to install it. Warning! I’m a bit of a newb but I think I understand, can I use this St-Link V2? And so I would connect them in this order right?

And then I should download st-link utility from here, then I need to get the bootloader Hex file from here. Could someone please tell me if I have all the necessary things?

@marc it looks like you’re on the right track, assuming you’re using Linux and are following the instructions on Vedder’s page.

Is it possible to do it on Windows?

@marc if it is, I’m unaware of how to do it. I’d go as far as to say that I don’t think so. All of the instructions (and the command lines) for installing a bootloader are for Linux. If you don’t have a spare PC you can create a dual-boot system or use a virtual machine within Windows.

Setup VirtualMachine with ubuntu and it should work, you can also run ubuntu from pendrive without installing it.

1 Like

Thanks for your guys’ help so far. Would this work for me though(this virtual machine stuff looks scary)?

1 Like

@marc nice find! I didn’t know this was available. I haven’t tried it so I can’t comment. But hey, this is DIY, so whatever gets the job done is good enough! Personally, I’ve stopped using Windows ports of VESC tools and only use Linux, I find it easier to understand and more reliable. BLDC Tool is designed for Linux.

Hi, I have a problem, i want to flash my vesc but when I want to connect my StLink to PC there an error message" Cannot connecte the stLink", solutions? Thanks