[solved] Debugging in Ubuntu, Eclipse, STM32-P152, ARM-USB-TINY-H does not work

Started by HesseLABP, May 26, 2015, 01:42:01 PM

Previous topic - Next topic

HesseLABP

Hello Olimex-Board!

I have a Problem with debugging my
• Olimex-Board (STM32-P152) with a
• Olimex-Debugger (ARM-USB-TINY-H) and
• Eclipse (Kepler) in
• Ubuntu (14.10).

I used the following post to configure everything: https://balau82.wordpress.com/2014/02/23/stm32-p152-development-with-eclipse-on-linux/

Unfortunately it's not really Working. It is possible to flash the code to the board but it can't be debugged. I use Balaus example-code as well.

In the following pictures you can have a look to my eclipse-settings.
https://www.dropbox.com/sh/tsj2h8ekptvl7bc/AABJvzwHn4e9VuenVoTr85CJa?dl=0








Please Help, I searched nearly everywhere to solve the problem.

Hint: In Balaus post is just one thing i couldn't find. Its an option in the debugging settings (Chapter:Attach debugger). The line is "Tick option Connect to running target". I can't find that point in Eclipse-Kepler - does this matter?

JohnS

Maybe try OpenOCD on its own to figure out where the fault lies.

John

HesseLABP


user@machine:/usr/share/openocd/scripts$ openocd -f ../scripts/interface/ftdi/olimex-arm-usb-tiny-h.cfg -f ../scripts/target/stm32l.cfg
Open On-Chip Debugger 0.8.0 (2015-04-09-15:21)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 100 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m reset_config sysresetreq
Info : clock speed 100 kHz
Info : JTAG tap: stm32l.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
Info : JTAG tap: stm32l.bs tap/device found: 0x06416041 (mfg: 0x020, part: 0x6416, ver: 0x0)
Info : stm32l.cpu: hardware has 6 breakpoints, 4 watchpoints


Thats what I get in a Terminal by using OpenOCD. Looks fine for me...

@JohnS: What should I try else? I'm new to OpenOCD...

HesseLABP

If I try to flash in Terminal there is success. Just debugging is not possible.

Thats what I get by flashing in Terminal:

user@machine:/$ openocd -f usr/share/openocd/scripts/interface/ftdi/olimex-arm-usb-tiny-h.cfg -f usr/share
/openocd/scripts/target/stm32l.cfg -f home/hesse/Schreibtisch/flash_blink.cfg
Open On-Chip Debugger 0.8.0 (2015-04-09-15:21)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 100 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m reset_config sysresetreq
Info : clock speed 100 kHz
Info : JTAG tap: stm32l.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
Info : JTAG tap: stm32l.bs tap/device found: 0x06416041 (mfg: 0x020, part: 0x6416, ver: 0x0)
Info : stm32l.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : JTAG tap: stm32l.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
Info : JTAG tap: stm32l.bs tap/device found: 0x06416041 (mfg: 0x020, part: 0x6416, ver: 0x0)
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000158 msp: 0x20004000
STM32L: Enabling HSI
adapter speed: 2000 kHz
auto erase enabled
Info : STM32L flash size is 128kb, base address is 0x8000000
wrote 4096 bytes from file home/hesse/Schreibtisch/Test7-blink-152.bin in 0.226903s (17.629 KiB/s)
shutdown command invoked



HesseLABP

Hello John,

thank you for your reply. I tried to use openocd together with gdb in eclipse. Flashing the Chip works, but debugging is not possible.

May you can figure out the major problem by whatching my Screenshoots?
https://www.dropbox.com/sh/tsj2h8ekptvl7bc/AABJvzwHn4e9VuenVoTr85CJa?dl=0

Do you think it is just a configuration error or could it be something else?


HesseLABP

Thanks for your help.
Now I fixed the problem by using "Zylin Embedded debug" instead "GDB OpenOCD Debugging" or "GDB Hardware Debugging".

Everything I did is described on this page:
http://vedder.se/2012/12/debugging-the-stm32f4-using-openocd-gdb-and-eclipse/

HesseLABP

Behind the following link I describe my problem solution for STM32-P152 EvalBoard and Eclipse in detail. Just in case somebody gets the same Problems as I had.

http://aetzenloetenprogrammieren.blogspot.de/2016/03/eclipse-fur-stm32-unter-ubuntu.html

In the moment the solution is only available in german, but I hope to write also an english version in the future...

Greetings
HesseLABP