News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

GDB J-Link usage

Started by Renftel, May 18, 2011, 12:21:19 AM

Previous topic - Next topic

Renftel

Hello!
I'm new here. I try to use my J-Link debugger via GDB server to debug my STM32 chips. I use the yagarto tools. The "arm-none-eabi-gdb.exe" is installed and registered and the Segger GDB server is running but I cant get a connection from CB to GDB.

Is there any guide available? Does anybody have used a J-Link ?


scarphin

If u're using version 10.05 and have the target type as 'native', that combination won't launch the debugger. It's been fixed some time before so pls try one of the latest nightlies of 'debugger branch' if u haven't yet. I don't have any experience with 'arm' but if u can be more specific about the problem someone more-experienced may help. Also u can try launching the '*gdb.exe' manually with appropriate command line options and try to see if it connects to the server. That may help diagnose the problem.

Renftel

Thaks for hints. I copied the "CB_20110402_rev7075_DEBUGGER_BRANCH_win32" in the codeblocks directory. The debugger connect now to the gdb and do program the STM32 chip. The program starts but I can't debug. There is no useful reaction of the debugger key no stop on breakpoints etc.

For information here my scrip to start the J-Link GDB. (Debugger settings: Debugger initialization commands):

target remote localhost:2331
monitor interface SWD
monitor endian little
# Reset the target
monitor reset 0

monitor flash device = STM32F103RB
monitor speed 1000
load ./bin/debug/ch.elf

monitor reg r13 = (0x00000000)
monitor reg pc   = (0x00000004)
monitor reset
continue

I tested the yagarto tools 4.6.0 and codesourcery 4.5.2 both have the behaviour. Any further recommendations?

oBFusCATed

#3
Have you looked at the debugger's debug log (the one with the communication between C::B and you debugger)?
Keep in mind that this is not the defautl debugger's log, but you should enable it in the debugger options.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]