VESC 4.12 unable to "make upload" the firmware

General topics and discussions about the VESC and its development.
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

VESC 4.12 unable to "make upload" the firmware

Postby malik » 11 Apr 2016, 12:02

Hello,

I just received a VESC 4.12, manufactured it myself, and i bought a discovery board to upload the firmware.
So I have been advised to change a specific line in the Makefile of the firmware in order to have the Discoveryboard working, which I did:

"openocd -f board/stm32f4discovery.cfg -c "reset_config trst_only combined" -c "program build/$(PROJECT).elf verify reset exit" # For openocd 0.9"
By the way, in vedders' configuration guide, the OpenOCD that the command installs is a 0.7.0 version.

So after I change that line, the error i get when uploading looks like this:
"Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
trst_only combined trst_push_pull
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Error: open failed
in procedure 'program'
in procedure 'init' called at file "embedded:startup.tcl", line 473
in procedure 'ocd_bouncer'
** OpenOCD init failed **
shutdown command invoked
make: *** [upload] Error 1
"
Sometimes I do not have that ocd_bouncer error though but the log I always get is:
"srst_only separate srst_nogate srst_open_drain connect_deassert_srst
trst_only combined trst_push_pull"


Can anyone please help?
thank you !

benjamin
Site Admin
Posts: 280
Joined: 15 Dec 2015, 08:38
Location: Sweden
Contact:

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

Postby benjamin » 19 Apr 2016, 12:24

have you also tried using the default makefile?

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 » 19 Apr 2016, 14:18

Hello,
I have tried as well. When i do not change the Makefile it stops with another error. I will post right after this messgae the error log when I keep the Makefile original.
Could it be the discovery board? it is a discovery stm32f407G-DISC1. I think there is a little difference with the other stlink devices.
Thank you

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 » 19 Apr 2016, 14:22

here is the error when i do not change anything. (i also tried with both override VIN_R1 and not).

make upload

" #qstlink2 --cli --erase --write build/BLDC_4_ChibiOS.bin
openocd -f interface/stlink-v2.cfg -c "set WORKAREASIZE 0x2000" -f target/stm32f4x_stlink.cfg -c "program build/BLDC_4_ChibiOS.elf verify reset"
Open On-Chip Debugger 0.7.0 (2013-10-22-08:31)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
0x2000
Info : This adapter doesn't support configurable speed
Error: open failed
in procedure 'transport'
** OpenOCD init Failed **
shutdown command invoked
#openocd -f board/stm32f4discovery.cfg -c "reset_config trst_only combined" -c "program build/BLDC_4_ChibiOS.elf verify reset exit" # For openocd 0.9
"

I hope this will help.
Thank you again

benjamin
Site Admin
Posts: 280
Joined: 15 Dec 2015, 08:38
Location: Sweden
Contact:

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

Postby benjamin » 19 Apr 2016, 17:47

open failed sounds like openocd cannot open the stlink at all. Did you install the udev rules as in my tutorial? You can try sudo make upload.

What happens if you type dmesg | tail after plugging in the stlink usb cable?

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 » 19 Apr 2016, 18:07

I installed udev and did the exact same steps indeed. I also tried sudo make upload and it doesnt change the output.
The VESC's blue led turns on correctly when i plug the usb which lets me believe the hw is working..
when i type dmesg | tail here is what i get:

"usb-storage 2-2.2:1.1: USB Mass Storage device detected
[13835.211835] scsi host34: usb-storage 2-2.2:1.1
[13835.271762] cdc_acm 2-2.2:1.2: ttyACM0: USB ACM device
[13836.382662] scsi 34:0:0:0: Direct-Access MBED microcontroller 1.0 PQ: 0 ANSI: 2
[13836.825382] sd 34:0:0:0: Attached scsi generic sg2 type 0
[13836.885914] sd 34:0:0:0: [sdb] 2080 512-byte logical blocks: (1.06 MB/1.01 MiB)
[13837.038958] sd 34:0:0:0: [sdb] Write Protect is off
[13837.038962] sd 34:0:0:0: [sdb] Mode Sense: 03 00 00 00
[13837.119890] sd 34:0:0:0: [sdb] No Caching mode page found
[13837.119895] sd 34:0:0:0: [sdb] Assuming drive cache: write through"

Thank you

benjamin
Site Admin
Posts: 280
Joined: 15 Dec 2015, 08:38
Location: Sweden
Contact:

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

Postby benjamin » 19 Apr 2016, 20:22

That does not look like you are plugging in an stlink at all. Which usb port are you using on the discovery board?

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 » 19 Apr 2016, 23:05

i have the Discovery board STM32f407G-DISC1 is plugged to usb(i think it is a different one).
So does that mean ithe wiring is wrong or the board itself?
Thanks a lot

benjamin
Site Admin
Posts: 280
Joined: 15 Dec 2015, 08:38
Location: Sweden
Contact:

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

Postby benjamin » 20 Apr 2016, 07:17

I had a quick look, and it seems like your discovery board has the st-link/v2-a, which also has mass storage and virtual com port modes. I couldn't find any documentation on whether openocd supports it, so maybe it does not work at all. It is probably easiest to get a different st-link and try that.

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, 10:53

Hello Benjamin,
That my theory as well i checked the doc but didnt find the difference. I ordered a new stlink few days ago, just waiting for it to ship ! I will keep you notified about the result.
Thank you so much,


[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 2 guests