how to run gdb outside of the IDE?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to run gdb outside of the IDE?

2,985 Views
rob4
Contributor II

I am using MCUxpresso 11.1 with a stock MIMXRT1060-EVK board.

Can anybody provide guidance on how to manually start gdb outside the IDE and attach to the board?

I've found the gdb executable (/arm-none-eabi-gdb), but haven't had any success in connecting to the target. I would like to be able to load the executable image via MCUxpresso, then start up arm-none-eabi-gdb outside the IDE. I expect to tell gdb "target remote localhost:<port>" but nothing I've tried seems to work.

thanks!

0 Kudos
Reply
5 Replies

2,893 Views
ErichStyger
Specialist I

Not sure I understand the motivation behind this. But if you want to run gdb manually (commandline, scripting), you might have a look at Tutorial: MCUXpresso SDK with Linux, Part 2: Commandline Debugging with GDB | MCU on Eclipse  (is for Linux, but the same applies to Windows).

I hope this helps,

Erich

2,893 Views
rob4
Contributor II

hi Erich,

The tutorial you referenced (I see you wrote it) discusses the SEGGER J-LINK  and the P&E Multilink, but I'm using the Redlink server  (or Link Server, or whatever it's called--it's the debugger connection via the Debug USB port).

I can restart the Redlink server via the IDE.

redlink> quit

[Closed]

[Started server]

[Connected on port 3025]

and it says [Connected on port 3025].  I can check port 3025:

$ lsof -i :3025

COMMAND     PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME

mcuxpress 55346  ryu   43u  IPv6 0x6b3235d17ccf19ad      0t0  TCP localhost:52087->localhost:arepa-raft (ESTABLISHED)

redlinkse 77224  ryu   15u  IPv6 0x6b3235d17ccf252d      0t0  TCP localhost:arepa-raft->localhost:52087 (ESTABLISHED)

but then I start up arm-none-eabi-gdb from the command line and try

target remote localhost:3025

and gdb eventually times out without connecting.  Any ideas on how to proceed?

thanks

-Rob

 

 

0 Kudos
Reply

2,893 Views
converse
Senior Contributor V

This may help:

How to use the command line with redlinkserv to enable gdb? 

Note that its states:

redlinkserv is NOT a gdbserver and it cannot be used as one.

0 Kudos
Reply

2,893 Views
rob4
Contributor II

Thanks Con Verse - that's a helpful link! I'll investigate.

I don't require a gdbserver--I just want to debug the board via gdb outside the IDE, which is clearly feasible because the IDE itself does it.

0 Kudos
Reply

2,893 Views
ErichStyger
Specialist I

Hi Rob,

I only have used it with P&E and J-Link, have not tried RedLink for this.

Erich

0 Kudos
Reply