Use mcuxpresso/linkserver debug via command line

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

Use mcuxpresso/linkserver debug via command line

3,043 Views
bp1979
Senior Contributor I

Is it possible to use the gdb debugging facilities from mcuxpresso via command line? I am having so much issues using mcuxpresso (on ubuntu) that I am looking for alternatives. 

I currently have my own cmake setup where I can compile and link with arm toolchain. I also managed to make a task to upload my compiled .axf file to target. 

The only thing I am struggling with is to be able to debug. Is there anything that can get me on my way? Which executables do I need to setup debugger with the mcuxpresso linkserver from command line?

0 Kudos
5 Replies

3,028 Views
ErichStyger
Senior Contributor V

Hi @bp1979 ,

You can easily do this with a SEGGER J-Link or a P&E Multilink, see https://mcuoneclipse.com/2015/03/25/command-line-programming-and-debugging-with-gdb/ , because they both implement a gdb server.

If you are using a LinkServer, then the issue is that this does not implement a gdb server, so you cannot easily use it that way. I know that there was a post in this forum years ago (cannot find it currently), where it basically describes to intercept/copy the commands passed to the linkserver in the IDE and use that for starting the debugger in command line mode. But it was mentioned there that this way is not recommended.

Update: here are some links:
https://community.nxp.com/t5/MCUXpresso-IDE/How-to-make-redlinkserv-work-in-the-command-line/m-p/714...

https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Using-the-command-line-flash-programming-tool/m-p/4...

 

I have used both SEGGER and PEMICRO for this kind of things, so if you happen to have a probe from them, that would be for sure the easiest path.

I hope this helps,

Erich

3,029 Views
bp1979
Senior Contributor I

Hi @CarlosGarabito 

This doesn;t tell me anything how to use your NXP linkserver from command line. Can you reveal anything there? How can I hook up the link server which ships with MCUXpresso from command line? 

Many thanks!

0 Kudos

1,796 Views
ErichStyger
Senior Contributor V

Hi @bp1979 ,

This is an older thread, but: NXP has now released a command line version of the LinkServer debug connection: https://mcuoneclipse.com/2023/05/14/linkserver-for-microcontrollers/

I hope this helps,

Erich

0 Kudos

3,017 Views
CarlosGarabito
NXP TechSupport
NXP TechSupport
0 Kudos