Author Topic: GDB J-Link usage  (Read 7323 times)

Offline Renftel

  • Single posting newcomer
  • *
  • Posts: 2
GDB J-Link usage
« on: May 18, 2011, 12:21:19 am »
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 ?

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: GDB J-Link usage
« Reply #1 on: May 18, 2011, 12:48:51 pm »
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.

Offline Renftel

  • Single posting newcomer
  • *
  • Posts: 2
Re: GDB J-Link usage
« Reply #2 on: May 19, 2011, 11:12:52 pm »
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

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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12233
    • Travis build status
Re: GDB J-Link usage
« Reply #3 on: May 19, 2011, 11:41:25 pm »
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.
« Last Edit: May 20, 2011, 12:05:22 am by oBFusCATed »
(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!]