NXP LPCXpresso

From SEGGER Wiki
(Redirected from NXP LPCXpresso Pro Edition)
Jump to: navigation, search

In order to get started with J-Link and LPCXpresso by NXP install the latest SEGGER software and documentation pack. Please verify that your J-Link software is up to date. For detailed instructions on how to install and use LPCXpresso, please refer to the LPCXpresso webpage and the getting started guide by NXP.

Debugging Configuration Options

For LPCXpresso there are two options how to use J-Link support:

  • Using the GNU ARM Eclipse Plugin together with LPCXpresso.
  • Using LPCXpresso as a vanilla Eclipse IDE by using the generic GDB Hardware Debugging plug-in.

SEGGER recommends the usage of option 1 (GNU ARM Eclipse Plugin) as it provides a much cleaner and more easy to use user front end to configure the J-Link connection in LPCXpresso as the standard Eclipse GDB Hardware Debugging plug-in. In the following, both methods are described.

GNU ARM Eclipse plugin

Please read the instructions for setting up the GNU ARM Eclipse Plugin. In addition to following the instructions on the GNU ARM website, you also have to add one preference.

  • Open Window | Preferences
  • Select Run/Debug
  • Select String Substitution
  • Click New
  • Enter cross_prefix in the "Name:" field.
  • Enter arm-none-eabi- in the "Value:" field.
  • Click OK

The added preference allows the plugin to find the correct version of the GDB.

NXP LPCXpresso Free Edition Tutorial 1.png

GDB Hardware Debugging Plug-In

  • First of all, the J-Link GDB Server needs to be started (included in the J-Link software suite). Please make sure that the CPU and Interface Type & Speed are set correctly.

NXP LPCXpresso Free Edition Tutorial 2.png

  • Open your current project in LPCXpresso.
  • Open Debug Configurations:

NXP LPCXpresso Free Edition Tutorial 3.png

  • In order to create a new debugging entry, double click GDB Hardware Debugging. Please make sure the bottom line is set to Using GDB(DSF) Hardware Debugging Launcher and your executable is selected in the field C/C++ Application. The Main Tab should look as follows:

NXP LPCXpresso Free Edition Tutorial 4.png

  • In the "Debugger" tab, the "GDB Command" field needs to be set to the location of the gdb client shipping with LPCXpresso. The default path is C:\nxp\LPCXpresso_VersionNumber\lpcxpresso\tools\bin\arm-none-eabi-gdb.exe. Assuming a local setup, default for Host name and Port number is localhost and 2331. The Debugger tab should look as follows:

NXP LPCXpresso Free Edition Tutorial 5.png

Finally, the Startup tab should look as follows:

NXP LPCXpresso Free Edition Tutorial 6.png

  • Depending on the CPU used, you may have to augment the gdb commands in the field following the checkbox labeled Halt.
  • After saving the settings by pressing Apply, you can start a debug session immediately by clicking Debug.

NXP LPCXpresso Free Edition Tutorial 7.png