User forums > Embedded development

No Breakpoints, No Call-Stack, No Disassambly with openOCD & arm-gdb



I have some problems when debugging my cortex-m firmware. I can start the session and connect with arm-none-eabi-gdb to my Target with Codeblocks. I can start and halt the Target. But when I halt, I can not see any Call-Stack or Disassambly. Also Target gets not halted on breakpoints. I think Codeblocks can't even set them properly on the target.

My Setup:
I'm starting a openOCD Session for an STM32F469 with Segger JLINK (replaced STM32F469IDiscovery ST-Link FW with Firmware from Segger). This works I think and I don't get errors.

This is the Output:
stderr> Open On-Chip Debugger 0.10.0
stderr> Licensed under GNU GPL v2
stderr> For bug reports, read
stderr> swd
stderr> adapter speed: 2000 kHz
stderr> adapter_nsrst_delay: 100
stderr> none separate
stderr> cortex_m reset_config sysresetreq
stderr> Info : J-Link STLink V21 compiled Dec 21 2016 15:10:59
stderr> Info : Hardware version: 1.00
stderr> Info : VTarget = 3.300 V
stderr> Info : clock speed 2000 kHz
stderr> Info : SWD DPIDR 0x2ba01477
stderr> Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
stdout> /opt/armcc_504u2/bin:/opt/armcc_504u2/bin/bin:/opt/arm-none-eabi-5_2-2016q1-20160125/bin:/opt/arm-none-eabi-5_2-2016q1-20160125/bin/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
stdout> Target  CPU1
stdout> GDB Port  23331
stdout> Telnet Port  24441
stdout> TCL Port  26661
stdout> jlink_CPU1.cfg

After my Build is ready I start a debug session. I this is my debugger config:

localhost 23331

After connection:

monitor reset halt
file ../Output/OutputARM/sciopta_armcpu1/sciopta_armcpu1.elf
mon flash write_image erase ../Output/OutputARM/sciopta_armcpu1/sciopta_armcpu1.elf
monitor halt

This is the Output when arm-none-eabi-gdb starts:

Starting debugger: /opt/arm-none-eabi-5_2-2016q1-20160125/bin/arm-none-eabi-gdb -nx -fullname -quiet  -args /home/user/workspace/stm32f469i_sciopta/stm32f469i_sciopta_keil_demo/Output/OutputARM/sciopta_armcpu1/sciopta_armcpu1
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Connecting to remote target
Setting breakpoints
Debugger name and version: GNU gdb (GNU Tools for ARM Embedded Processors (with big-endian patch))
In ?? () ()
Failure finding "Stack level "
Failure matching reg_output

Whan I start my target it runs, and if I halt it I get following output but my target stops:

Trying to interrupt process with pid: 30202; child pid: 0 gdb pid: 30202
Program received signal SIGINT, Interrupt.
In ?? () ()
Failure finding "Stack level "
Failure matching reg_output

I don't know why it does not work anymore. When I set it up it worked just fine. I could do breakpoints and see the callstack. But now it is not working.
I have to say, that I tried several debug configs. Recently I added the "flash write_image" command because I couldn't write FW to Target.

Does anybody have an idea what is wrong with my config here?

Kind regards

Hi again,

that's crazy! As the most times the problem is very small :).

Short: My Path for gdb command "file" is wrong.

I didn't notice that Codeblocks Working Directory and the OpenOCD Working Directory are different. So now I can load my elf file properly.
The right "after connection" config of GDB is:

monitor reset halt
file Output/OutputARM/sciopta_armcpu1/sciopta_armcpu1.elf
mon flash write_image erase ../Output/OutputARM/sciopta_armcpu1/sciopta_armcpu1.elf
monitor halt

Lunch time...

Kind regards


[0] Message Index

Go to full version