In order to allow hardware debugging on embedded systems via GDB + GDB Server, there is also an Eclipse plugin needed, which enables hardware debugging via GDB (e.g. the CDT plugin). For further information about these plugins, please refer to the section "GNU ARM Eclipse plugin".
After setting up Eclipse + Plugin, Eclipse will use GDB as debugger where GDB communicates via the GDB protocol with J-Link GDB Server, allowing to debug the target hardware which is connected to a J-Link.
Note: J-Link GDB Server is part of the J-Link Software and Documentation Pack and can be used free of charge.
The GNU ARM Eclipse project is a collection of plug-ins for Eclipse CDT and ARM toolchains including extensions for easy embedded development in Eclipse. It is recommended to use this plug-in when working with a standard Eclipse installation.
One part if it is a debugger plug-in for for J-Link which allows easy configuration and usage of J-Link GDB Server within Eclipse. It is cross-platform available (Windows, Linux, Mac) and features the corresponding versions of J-Link GDB Server. Detailed step-by-step instructions on how to setup Eclipse are available on the GNU ARM Eclipse plug-ins website.
It also provides very well documented step-by-step instructions on how to get up and running with the plug-in itself.
- Install the J-Link plugin: http://gnuarmeclipse.github.io/plugins/install/
- Install the J-Link software: http://gnuarmeclipse.github.io/debug/jlink/install/
- Use the J-Link plugin: http://gnuarmeclipse.github.io/debug/jlink/
Despite the GNU ARM Eclipse plugins, J-Link can be used with Eclipse using some other plugins. With the native CDT plugin it is possible to connect to a running GDB Server, which has to be configured before starting a debug session. Some (commercial) eclipsed-based IDEs provide native or GDB Server based J-Link support. The debug connection setup for each IDE may vary. For instructions please refer the the corresponding documentations.
Note: SEGGER does only provide support and maintenance for problems which are directly related to J-Link or GDB Server. For problems with Eclipse, its plugins or Eclipse-based solutions, please contact the respective distributors.
I am using a standard Eclipse. What do I need to debug my application with J-Link?
A: To debug with J-Link the CDT plugin with GDB Server support, the GNU ARM Eclipse plugins or a similar plugin are required.
I have all plugins installed. What else do I need?
A: To use J-Link, the J-Link Software and Documentation Pack has to be installed. It includes the J-Link USB drivers and the J-Link GDB Server.
I cannot set a debug session with one of the plugins. Where can I get help?
A: For setting up a debug session, please refer to the respective documentation of the used plugin. SEGGER can only provide support for problems which are directly related to J-Link or GDB Server.
Does SEGGER support and maintain the GNU ARM Eclipse plugins?
A: No. The GNU ARM Eclipse plugins are not affiliated with SEGGER and are created, supported and maintained by Liviu Ionescu. SEGGER does only recommend these plugins as they are easy to use.
I am missing a feature in Eclipse. Can SEGGER add it?
A: No. SEGGER does not develop Eclipse or its plugins. Please contact the respective distributors.
When debugging with Eclipse, some commands do not work with J-Link. Why not?
A: Eclipse was mainly designed for JAVA development, later C/C++ development features and debugging features were added via plugins. Some of the plugins even work for embedded development, but there might be limitations related to the used plugin. In some cases it is possible to control J-Link and GDB Server by issuing monitor commands directly via GDB. (In the Eclipse Consoles -> ".../arm-...-gdb.exe") For the available GDB Server commands refer to the corresponding chapters in the J-Link User Manual (UM08001_JLink.pdf). Otherwise another debugger plugin or debugger might be needed.
Where can I find the GDB and GDB Server output?
A: Most Eclipse plugins invocate GDB and GDB Server and redirect input and output to the Console Window. GDB commands can be executed in the arm-...-gdb Console. gdb traces shows the log output of executed GDB commands. JLinkGDBServer(CL) shows the log output of GDB Server.
I am absolutely sure I set up everything correctly, but GDB Server or J-Link report errors. Can SEGGER help?
A: In this case, mostly yes. If your J-Link is within the support period (12 / 24 months), contact us at firstname.lastname@example.org. If you are using a J-Link LITE / EDU / OB or an older J-Link, please use the SEGGER Forum. To allow fast response, please add your J-Link S/N, your target device name, the Eclipse version number, the used plugin and the GDB Server output to your mail or post.
Is there an alternative to debugging with Eclipse?
A: Yes. There are many commercial and free IDEs and stand-alone debuggers available. If you want to use Eclipse for your project development but not for debugging, J-Link Debugger is a good soulution. It is a full featured stand-alone GUI debugger to be used with J-Link, featuring nearly all functionality of J-Link. J-Link Debugger is as flexible as Eclipse, but with better performance and intuitively easy to use user interface. It is available free of charge and can also be used with Eclipse-created applications.