Infineon ModusToolbox
In order to use J-Link with ModusToolbox, make sure that the latest version of the J-Link software and documentation package is installed. ModusToolbox uses Eclipse/CDT-based debug configurations, so J-Link can be selected as the debug probe in the project’s launch configuration.
ModusToolbox provides example projects for various Infineon/Cypress evaluation kits and devices. These examples can be imported and configured to debug via J-Link / J-Trace.
ModusToolbox also provides various tools for flashing, configuring, provisioning and developing applications for Infineon devices.
Using a ModusToolbox project with J-Link
The following steps explain how to configure a ModusToolbox project to be used with J-Link.
- Open Eclipse for ModusToolbox
- Import or create the project to configure
- Build the project once to make sure that the application ELF file is generated
- Click the Run dropdown in the toolbar and select Debug Configurations...
- In the left-hand tree, select the debug configuration for the project
** Depending on the ModusToolbox version and installed debug support, this may be listed below GDB SEGGER J-Link Debugging or another GDB debug configuration type
- Make sure that the correct project and application ELF file are selected
- Make sure that the appropriate target device name is selected
- Make sure that the appropriate target interface is selected, for example SWD or JTAG
- Make sure that a proper target interface speed is selected
** 4000 kHz works for almost all Cortex-M based targets and leads to good performance
- Make sure that the paths to the J-Link GDB Server and the GDB client are correct
- Click Apply
- Click Debug to start the debug session
- ModusToolbox now downloads the application to the target and starts the debug session
- The project is now ready to be debugged with J-Link / J-Trace
Creating a J-Link debug configuration manually
If no suitable J-Link debug configuration exists yet, create one manually.
- Click Run | Debug Configurations... from the main menu
- Select GDB SEGGER J-Link Debugging
- Click New launch configuration
- Select the project to debug
- Select the generated application ELF file
- Configure the target device, target interface and interface speed
- Make sure that the paths to the J-Link GDB Server and the GDB client are correct
- Click Apply
- Click Debug
Notes
- Make sure that the device selected in the debug configuration matches the actual target device.
- When using SWD, make sure that the target board exposes the SWDIO, SWCLK, GND and VTref signals to the J-Link.
- If the target does not connect reliably, reduce the target interface speed.
- If the debug session does not start, verify that the latest J-Link software package is installed and that J-Link can connect to the target using J-Link Commander.