How to launch a gdb server to connect to a LPC55S16 board ?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to launch a gdb server to connect to a LPC55S16 board ?

107 Views
vdupaquis
Contributor I

Hello,

To be able to automate some test suite, I need to launch the gdb server to be able to connect to gdb, using a script.

I dug into nxp tools, and could not find any documented way to doing this. Most probably the crt_emu_cm_redlink tool. I've searched into the documentation I have but could not manage to make it work.

Is there any way of extracting this information from MCUEpressoIDE ?

Is there a documentation about this ?

Best regards,
Vincent.

Labels (1)
Tags (1)
0 Kudos
4 Replies

100 Views
converse
Senior Contributor IV

Mcuxpresso uses a gdb ‘serial’  connection, instead of a gdb remote connection. Look in the Gdb console during a debug session. This will show you the commands used. Beware that some of the commands are gdb-mi commands, so you may need to look for the gdb script equivalents.

gdb-mi is the machine interface to gdb, where the results are returned in a machine parsable format.

0 Kudos

89 Views
vdupaquis
Contributor I

Hello, thanks to have taken the time to reply.

I've just disconnected the board during connection to have access to the sent commands, else the console is cleared, and I cannot see the dialog. Isn't there a way of seeing the full dialog instead of having to hack this way ?

Regards,
Vincent.

 

0 Kudos

81 Views
converse
Senior Contributor IV

Sorry, you actually need to see the "gdb traces" console, which is a sub-view of the "Console" (See below). The contents of this window is retained after the termination of a debug session. 

Screenshot 2021-06-08 at 09.04.24.png

0 Kudos

77 Views
vdupaquis
Contributor I

Thanks to your help, I think I succeeded

I translated the MI commands to GDB ones, and ended-up with :

set breakpoint pending on
set detach-on-fork on
set python print-stack none
set print object on
set print sevenbit-strings on
set host-charset UTF-8
set target-charset UTF-8
set target-wide-charset UTF-32
set dprintf-style call
set target-async on
set record full stop-at-limit off
set non-stop on
set auto-solib-add on
target extended-remote | /path-to-redlink/crt_emu_cm_redlink -g -mi -2 -pLPC55S16 -vendor=NXP --bootromstall 0x50000040 --reset= -ProbeHandle=1 -CoreIndex=0 -cache=disable --flash-hashing --flash-driver= -x /path-to-project/Debug --flash-dir /usr/local/mcuxpressoide-11.3.0_5222/ide/plugins/com.nxp.mcuxpresso.tools.bin.linux_11.3.0.202101111545/binaries/Flash --flash-dir /mnt/Data2/Documents/MCUXpresso_11.3.0_5222/workspace/.mcuxpressoide_packages_support/LPC55S16_support/Flash

The last hurdle I met was the "-msg-port" and the "--telnet" I had top remove (the port is somehow communicating with mcuexpresso).

 

Regards,
Vincent.

 

0 Kudos