Can't debug in System workbench for STM32.
Hello.
I have made some code for NUCLEO-L053R8 board.
When I try to start debug by pressing the Bug button I get this error message:
An internal error occurred during: “Launching DMATest_Eclipse.elf”.
org.eclipse.cdt.dsf.gdb.service.GdbDebugServicesFactory.(Ljava/lang/String;Lorg/eclipse/debug/core/ILaunchConfiguration;)V
The terminate button is greyed out.
If I try to press Bug button again the software says that Debug DMATest_Eclipse.elf is already running.
Now I have to remove launch.
When I press the green arrow (Run) button I get this message:
Open On-Chip Debugger 0.10.0-dev-00272-gf17dc4a (2016-10-10-09:38)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 300 kHz
adapter_nsrst_delay: 100
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
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 300 kHz, using 240 kHz
Info : Unable to match requested speed 300 kHz, using 240 kHz
Info : clock speed 240 kHz
Info : STLINK v2 JTAG v27 API v2 M v15 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.268993
Info : stm32l0.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : Unable to match requested speed 300 kHz, using 240 kHz
Info : Unable to match requested speed 300 kHz, using 240 kHz
adapter speed: 240 kHz
stm32l0.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xf1000000 pc: 0x080002bc msp: 0x20002000
STM32L0: Enabling HSI16
Info : Unable to match requested speed 2500 kHz, using 1800 kHz
Info : Unable to match requested speed 2500 kHz, using 1800 kHz
adapter speed: 1800 kHz
- Programming Started **
auto erase enabled
Info : Device: STM32L0xx (Cat. 3)
Info : STM32L flash size is 64kb, base address is 0x8000000
Warn : couldn’t use loader, falling back to page memory writes
wrote 8192 bytes from file Debug/DMATest_Eclipse.elf in 1.411427s (5.668 KiB/s)
- Programming Finished **
- Verify Started **
Error: JTAG failure
Error: Error setting register
stm32l0.cpu: target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000002e msp: 0x20002000
Error: JTAG failure
Error: Error setting register
verified 5424 bytes in 0.077464s (68.379 KiB/s)
- Verified OK **
- Resetting Target **
Info : Unable to match requested speed 300 kHz, using 240 kHz
Info : Unable to match requested speed 300 kHz, using 240 kHz
adapter speed: 240 kHz
shutdown command invoked
The code starts to run but terminate button is greyed out and I can’t open any watch variables.
I use nucleo_l053r8.cfg configuration script.
What is the problem here?
I am greatful for all help I can get.
Regards.
/Bo Liljedahl