2017-03-02 12:21 AM
I encounter debug problems when trying to make blink an LED of a board that include a STM32F103C8T6.
I set up the hardware firmware (GPIOs) with the program STM32CubeMx, and wrote two lines code to make the led blink:
HAL_GPIO_TogglePin(LD2_GPIO_Port,LD2_Pin);
HAL_Delay(1000);Simple.
Then I build the project which was ok
But when I tried to debug here is the error message I got:
Once I run it the console message is:
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHzadapter_nsrst_delay: 100srst_only separate srst_nogate srst_open_drain connect_assert_srstsrst_only separate srst_nogate srst_open_drain connect_assert_srstInfo : Unable to match requested speed 1000 kHz, using 950 kHzInfo : Unable to match requested speed 1000 kHz, using 950 kHzInfo : clock speed 950 kHzError: read version failedin procedure 'program' in procedure 'init' called at file ''embedded:startup.tcl'', line 473in procedure 'ocd_bouncer'** OpenOCD init failed **shutdown command invokedAny idea what could cause the problem?
Thanks
#stm32f103c8t6-blink-led2017-03-02 12:57 AM
Hi,
You may refer to this
https://community.st.com/0D50X00009XkddhSAB
it may help you on your issue. You should check the ST-Link firmware version and your configuration GPIO toggled pin.Imen
2017-03-19 02:37 AM
Hello,
Ok, I updated my STLINK device using STM32 ST-LINK Utility.exe but now I got this message when running debug :
Thanks
2017-03-19 08:38 PM
This is likely something you'd need to discuss with the Ac6 SW-STM32 support people directly. Perhaps a driver issue?
2017-03-28 04:26 AM
Hello Lewis,
For debug purpose, could you locate the 'openocd.exe' file (it should be somewhere under your $HOME/.p2 directory).
Could you launch it manualy in a command shell ?
This to be sure you do not have some executable right issue.
Could you share the path name of your openocd tool ?
Kind regards
Sirma
2017-03-29 02:40 AM
I had a similar problem.
See if this helps.
1 -
/external-link.jspa?url=http%3A%2F%2Fwww.openstmorg%2Ftiki-view_forum_thread.php%3FforumId%3D7%26comments_parentId%3D4785%23threadId7
2 -
/external-link.jspa?url=http%3A%2F%2Fwww.eevblog.com%2Fforum%2Fmicrocontrollers%2Fdebug-problems-with-stm32f030%2Fmsg1172575%2F%23msg1172575
2017-03-29 07:47 AM
Hi Sirma,
Yes I launch it manually on command prompt using CMD on windows 10.
Here is what it returns:
It says ''can't find openocd.cfg''
the path name is:
C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.openocd.win32_1.13.1.201703061523\tools\openocd\bin
Thanks
2017-03-30 05:44 AM
Ok it seems to be working now. I had to write the code: ( -c 'reset_config none' ) under openocd option int the debug configuration since my board doesn't include the hardware reset that is not connected to STlink.
Thanks you all.
2017-04-24 12:39 AM
Now I'm trying to set the semihosting mode to be able to use printf and scanf fonction and the results on the openOCD console of the SW4STM32 IDE.
On the nucleo boards I have no diffuclty to make it work but on this type of board where you have to hook up an external third party stlink module it doesn't work.
I'm using the procedure for semihosting described on the help contents and SystemWorkbench for STM32/Advanced/Semihosting.
addd: -c ''reset_config none'' - under openocd option int the debug configuration
And now at the debug mdoe I got this error:
Thanks for your help.
2017-04-25 12:43 AM
Oddly when I run for debug a simple Blink code I don't have errors but when using semihosting the error showes up!
Maybe something related to debug device or interface du to the third party stlink device?