Loading...
 
Skip to main content

System Workbench for STM32


Cannot debug using openOCD

Hi!

I have a userboard with a STM32F030RTC. Starting the debug-session using OpenOCD exits with following message:


Open On-Chip Debugger 0.10.0-dev-00267-g884c33c (2016-03-16-12:22)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
srst_only separate srst_nogate srst_open_drain connect_assert_srst
srst_only separate srst_nogate srst_open_drain connect_assert_srst
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: 2.496126
Info : stm32f0x.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : accepting 'gdb' connection on tcp/3333
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
adapter speed: 950 kHz
stm32f0x.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x0800029c msp: 0x20008000
Error: mem2array: Read @ 0x40021004, w=4, cnt=1, failed
C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_1.8.0.201603291114\resources\openocd\scripts/mem_helper.tcl:6: Error:
in procedure 'reset'
in procedure 'ocd_bouncer'
in procedure 'ocd_process_reset'
in procedure 'ocd_process_reset_inner' called at file "embedded:startup.tcl", line 248
in procedure 'stm32f0x.cpu' called at file "embedded:startup.tcl", line 370
in procedure 'ocd_bouncer'
in procedure 'stm32f0x_default_reset_init'
in procedure 'mmw' called at file "C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_1.8.0.201603291114\resources\openocd\scripts/target/stm32f0x.cfg", line 83
in procedure 'mrw' called at file "C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_1.8.0.201603291114\resources\openocd\scripts/mem_helper.tcl", line 16
at file "C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_1.8.0.201603291114\resources\openocd\scripts/mem_helper.tcl", line 6

Error: jtag status contains invalid mode value - communication failure
Polling target stm32f0x.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 100ms
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected

Using the Program-Utility: „STM32 ST-LINK Utility“ works fine with activated „connect Under Reset“ in the „Mode“ option, but not with default settings.

The screenshot of the debug configuration is attached.

Thanks in advance!

Regards SlawaG