Olimex Support Forum

ARM => ST => Topic started by: HesseLABP on May 26, 2015, 01:42:01 PM

Title: [solved] Debugging in Ubuntu, Eclipse, STM32-P152, ARM-USB-TINY-H does not work
Post by: HesseLABP on May 26, 2015, 01:42:01 PM
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 (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?
Title: Re: Debugging in Ubuntu with Eclipse, STM32-P152 and ARM-USB-TINY-H does not work
Post by: JohnS on May 26, 2015, 03:55:01 PM
Maybe try OpenOCD on its own to figure out where the fault lies.

John
Title: Re: Debugging in Ubuntu with Eclipse, STM32-P152 and ARM-USB-TINY-H does not work
Post by: HesseLABP on May 26, 2015, 04:38:17 PM

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...
Title: Re: Debugging in Ubuntu with Eclipse, STM32-P152 and ARM-USB-TINY-H does not work
Post by: HesseLABP on May 26, 2015, 04:53:10 PM
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

Title: Re: Debugging in Ubuntu with Eclipse, STM32-P152 and ARM-USB-TINY-H does not work
Post by: JohnS on May 26, 2015, 09:00:34 PM
Maybe gdb with OpenOCD.

John
Title: Re: Debugging in Ubuntu with Eclipse, STM32-P152 and ARM-USB-TINY-H does not work
Post by: HesseLABP on May 28, 2015, 11:11:10 AM
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?
Title: Re: Debugging in Ubuntu with Eclipse, STM32-P152 and ARM-USB-TINY-H does not work
Post by: JohnS on May 28, 2015, 01:51:32 PM
I don't use Eclipse.

John
Title: Re: Debugging in Ubuntu with Eclipse, STM32-P152 and ARM-USB-TINY-H does not work
Post by: HesseLABP on May 28, 2015, 06:32:43 PM
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/
Title: Re: [solved] Debugging in Ubuntu, Eclipse, STM32-P152, ARM-USB-TINY-H does not work
Post by: HesseLABP on March 24, 2016, 01:27:59 AM
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 (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