Sysprogs forums › Forums › VisualGDB › OpenOCD + ST-Link v2.1
Tagged: VisualGDB OpenOCD ST-Link
- This topic has 5 replies, 2 voices, and was last updated 8 years, 5 months ago by support.
-
AuthorPosts
-
May 31, 2016 at 10:11 #8326januloParticipant
Hi there,
I have problem to start debugging STM32L476G-DISCO board with built-in ST-Link debugger and VisualGDB. Detect button in Debug settings of VisualGDB Project Properties successfully find ST-Link v2.1. When I press “Test OpenOCD settings” button, I get error “OpenOCD exited with code 1. Please check your settings.”. In output console is written:
C:\Users\matik\AppData\Local\VisualGDB\EmbeddedDebugPackages\com.sysprogs.arm.openocd\bin\openocd.exe -f interface/stlink-v2-1.cfg -f target/stm32l4x.cfg -c init -c “reset init” -c “gdb_port 49624” -c “telnet_port 49623”
Open On-Chip Debugger 0.9.0 (2016-05-10) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport “hla_swd”. To override use ‘transport select <transport>’.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 500 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : clock speed 480 kHz
Info : STLINK v2 JTAG v25 API v2 SWIM v13 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.221011
Info : stm32l4x.cpu: hardware has 6 breakpoints, 4 watchpoints
stm32l4x.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
adapter speed: 4000 kHz
Warn : unable to change server port after initSTM32 ST-LINK Utility can find, read, write, erase and also update FW in ST-Link.
Do you have any solution to this problem? Everything was working yesterday, nothing in hardware or in computer has been changed since then.
We faced similar problem when original demo fw was in DISCO board, but after full erase using ST-LINK utility, OpenOCD started to work.May 31, 2016 at 16:54 #8330supportKeymasterHi,
This is a known bug that was recently fixed. Please try re-downloading the OpenOCD debug package again and if this does not help, update to VisualGDB 5.1r6.
June 1, 2016 at 09:49 #8333januloParticipantThanks for reply.
Finally, I realized that problem was in “Solution platforms”. I have created new solution platform named Arm and deleted Win32 platform. When I undo this, finally debugging started to work. I’m not sure if re-downloading of OpenOCD or update to VisualGDB 5.1r6 was needed, because I did this before finding problem with Arm/Win32 problem.
Anyway, thanks for quick support!
June 1, 2016 at 23:11 #8342supportKeymasterHi,
Most likely it is just a coincidence and the problem was fixed by re-downloading OpenOCD.
“Warn : unable to change server port after init” was definitely caused by our bug and we fixed it almost immediately after releasing the affected version. Most likely you have originally downloaded that version and then replaced it with a fixed one.
June 2, 2016 at 07:45 #8347januloParticipantI’ve just tried to switch solution platform to ARM and when trying to start debugging I get MessageBox with title “Microsoft Visual Studio” and text: “Unable to start debugging. Check your debugger settings by opening project properties and navigating to ‘Configuration Properties–>Debugging’ “.
If I switch back to Win32 platform, debugging works fine.
So version fix have stabilized behavior of debugger – it always starts. But you can not use solution platform switch, I always have to use Win32 option. For me it’s not a problem, I just tried this ARM option if it does not help me with disabling _WIN32 symbol, which is defined by default in VS – as described in Predefined Macros
I will create new forum post regarding this _WIN32 symbol.
June 3, 2016 at 00:34 #8352supportKeymasterHi,
Most likely, something gets broken with the build commands. Feel free to open another topic on that and we will provide troubleshooting advice.
-
AuthorPosts
- You must be logged in to reply to this topic.