Sysprogs forums › Forums › VisualGDB › STLINK v2 & OpenODC problem
- This topic has 1 reply, 2 voices, and was last updated 8 years, 4 months ago by support.
-
AuthorPosts
-
July 8, 2016 at 14:02 #8545EdgarusParticipant
Hi,
I have a problem with programming and debuging STM32F205RB mcu using OpenOCD.
On erased mcu, when I start to debug I receive this:
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>’.
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
none separate
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v27 API v2 SWIM v6 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.247435
Info : stm32f2x.cpu: hardware has 6 breakpoints, 4 watchpoints
stm32f2x.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 00000000 pc: 0xf000b580 msp: 0x0000be00
VisualGDB_OpenOCD_Ready
Info : accepting ‘gdb’ connection on tcp/55166
Info : device id = 0x201f6411
Info : flash size = 128kbytes
stm32f2x.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 00000000 pc: 0xf000b580 msp: 0x0000be00
stm32f2x.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 00000000 pc: 0xf000b580 msp: 0x0000be00
Error: timed out while waiting for target halted
stm32f2x.cpu: target state: halted
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0x01000003 pc: 0xd0f74546 msp: 0x0000bde0
Error: error waiting for target flash write algorithm
Error: error writing to flash at address 0x08000000 at offset 0x00000000
stm32f2x.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 00000000 pc: 0x0f00f1b8 msp: 0x8000f8d0
Error: address + size wrapped(0xffffffff, 0x00000004)
Error: address + size wrapped(0xffffffff, 0x00000002)
Error: address + size wrapped(0xffffffff, 0x00000004)
Error: address + size wrapped(0xffffffff, 0x00000002)Programming/erasing mcu with ST-LINK Utility works.
After programming mcu with ST-LINK, test on OpenOCD returns this:
C:\Users\pgawd\AppData\Local\VisualGDB\EmbeddedDebugPackages\com.sysprogs.arm.openocd\bin\openocd.exe -f interface/stlink-v2.cfg -f target/stm32f2x.cfg -c init -c “reset init” -c “echo VisualGDB_OpenOCD_Ready”
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>’.
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
none separate
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v27 API v2 SWIM v6 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.245836
Error: init mode failed (unable to connect to the target)
in procedure ‘init’
in procedure ‘ocd_bouncer’After erasing mcu with st-link, I OpenOCD test goes well, but I can’t program mcu with visualgdb + openocd.
Any ideas?
Best regards
July 9, 2016 at 04:39 #8546supportKeymasterHi,
Looks like the ST-Link might be leaving the target in a state where it does not respond to SWD requests properly. Please try unplugging/replugging the JTAG programmer and check if the problem also happens when programming a basic “Hello, World” program. Perhaps something in your firmware interferes with the debug unit.
-
AuthorPosts
- You must be logged in to reply to this topic.