VESC 4.12 unable to "make upload" the firmware

General topics and discussions about the VESC and its development.
MMichi
Posts: 7
Joined: 10 Mar 2016, 15:41
Location: Deutschland
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: VESC 4.12 unable to "make upload" the firmware

Postby MMichi » 20 Apr 2016, 13:16

Updated Stlink firmware. It's included in stlink utility.

rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: VESC 4.12 unable to "make upload" the firmware

Postby rew » 20 Apr 2016, 18:24

FYI, the old STLINk would come up in "DFU mode". Then you could update the firmware of the STLINK itself. When using it to program other devices, my stlink utility (st-util) reports: exiting DFU mode.

The new STLINK (2.1, and apparently V2-a), presents itself as an USB disk (storage device). Just copying the binary (.bin!) onto it should program it into the attached CPU. On the other hand, utilities like st-util and OpenOCD should by now know the trick of getting the programmer out of "disk mode" into STLINK mode.

Ok. I got my V2.1 STLINK out of the closet. First time, st-util recognized it, recognized the (not-on-the-nucleo) processor.

Then somehow, that no longer worked and I got the extra disk. Wanting to try that, I copied my ch.bin over to that disk and.. nothing. My external CPU crashed after a while but nothing happened. Next time I did: mount / copy / umount in quick succession, and this time it programmed the binary into the chip and it then booted!

So: I don't like the reliability of this, but without any other tools, you can try to flash your VESC with the V2-a stlink without delay.

malik
Posts: 28
Joined: 11 Apr 2016, 11:34
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: VESC 4.12 unable to "make upload" the firmware

Postby malik » 20 Apr 2016, 21:44

Hello @rew,
thank you for your advice.
It was very complicated finding info on stlink-a.
I am in front of it now. the .bin file is this one right: "BLDC_4_ChibiOS.bin"?
i should just mount the disk, copy the .bin in the disk and unmount? thats it?
Thank you again,

rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: VESC 4.12 unable to "make upload" the firmware

Postby rew » 21 Apr 2016, 07:27

I've been working with STM32 chips longer than I have been working with VESC. When I compile VESC I get an annotated binary (.elf) file that I use with gdb and st-util to put into my STM32. Chibios by default also produces a raw binary file (.bin). They usually reside in the "build" directory. But I'm guessing you're not compiling your software yourself. I have no experience with using precompiled VESC software. I'm wary of programming wrong software into my VESC and blowing up hardware.

malik
Posts: 28
Joined: 11 Apr 2016, 11:34
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: VESC 4.12 unable to "make upload" the firmware

Postby malik » 21 Apr 2016, 15:16

Once i "git clone" the firmware, i have indeed the build folder with .bin and .elf files. what should i do with them exactly (if you dont min me asking)?
Saddly, I am really new to all this: vesc AND stm32 chips in general. I am on top of that a Mac user using Ubuntu only for the VESC as in @benjamin Vedder's guidelines. :oops:
I dragged and dropped the .bin file very stupidly but I am pretty sure it is far from being the right procedure. Never the less, once I did that, the VESC's blue AND green led turned on (if i remove the power source, a red light blinks). Is this a good sign at all?
Any extra advice?

Thank you



PS:
if I plug the VESC directly to usb, i get a notification error on my Mac to unplug the device drawing too much energy, and it actually doesnt recognize the device at all.

rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: VESC 4.12 unable to "make upload" the firmware

Postby rew » 22 Apr 2016, 04:36

Drag-drop is exactly what stlink v2.1 is supposed to allow. So.... i think you programmed you VESC correctly.

Why you mac thinks your VESC is drawing too much current... I dont know: the USB 5V is not connected on a standard VESC. (Optional on my implementation.... the reason? My Vesc is running a bit hot because it is trying to power my pc.... current can also flow the other way... )

malik
Posts: 28
Joined: 11 Apr 2016, 11:34
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: VESC 4.12 unable to "make upload" the firmware

Postby malik » 22 Apr 2016, 13:37

Ok so is there anything to do then for the usb? I used a usb hub which has a green led always on with any plugged device to it, everytime i plug the vesc, it seems that indeed the current in flowing the other way as you said and the green led turns off.

I did not really understand your answer though, you had the same issue with the usb? is there anything to do about it?
I am thinking of posting a new thread about it.

Thank you so much for your tips, it is extremely helpful to me after days and weeks of headaches !

rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: VESC 4.12 unable to "make upload" the firmware

Postby rew » 23 Apr 2016, 11:10

If you don't connect the battery, just the USB. Does the VESC work?
No? You have a standard VESC that cannot back-power the USB system like mine does.

malik
Posts: 28
Joined: 11 Apr 2016, 11:34
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: VESC 4.12 unable to "make upload" the firmware

Postby malik » 23 Apr 2016, 11:46

It does not work :( .
Does that mean the VESC i have is useless? how did you solve this issue?
i hope there is a solution to this...
thanks

malik
Posts: 28
Joined: 11 Apr 2016, 11:34
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: VESC 4.12 unable to "make upload" the firmware

Postby malik » 24 Apr 2016, 11:09

I have posted a new topic to discuss this usb problem.

viewtopic.php?f=6&t=183


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Return to “General”

Who is online

Users browsing this forum: No registered users and 3 guests