How to Use J-Link
When you use J-Link in CoIDE, the debug configuration and operation is different from other adapters'.
- CoIDE doesn't contain the software of J-Link, please download the latest version from SEGGER.
- When you select J-Link as the adapter, the download button and erase button are invalid. J-Link doesn't use the CooCox Flash algorithm, but handles flash programming automatically on debug session start. Just the "Debug" button needs to be clicked.
- For the new chips, if the latest J-Link software does not come with full J-Link support (Flash Download and Unlimited Flash Breakpoints) yet, debugging in general is still possible and supported.you can select Debug in RAM in the Project Configuration then debug the project in RAM.
You need to set the debug configuration as follows:
Visit the website of J-Link, download the latest J-Link software, and install it on your PC. Then connect the J-Link to your computer and install the driver for it.
2. Open Configuration view, then click the "Debugger" Tab, to enter the Debugger Configuration:
3. Configure the Debugger page:
- Adapter: Select J-Link
- Port: J-Link supports SWD and JTAG debug mode.
- Reset Mode: There are 10 reset modes could be selected:
- Type 0: Normal
- Type 1: Core
- Type 2: ResetPin
- Type 3: Connect under reset
- Type 4: Reset Core & Peripherals, halt after bootloader
- Type 5: Reset Core & Peripherals, halt before bootloader
- Type 6: Reset for Freescale Kinetis devices
- Type 7: Reset for Analog Devices CPUs (ADI Halt after kernel)
- Type 8: Reset core and peripherals
- Type 9: Reset for LPC1200 devices
- Type 10: Reset for Samsung S3FN60D devices
- You can refer to J-Link ARM User Guide, 5.8.2: Strategies for Cortex-M devices to get the detail information for how to select reset mode.
- JLink Info
- GDBServer cmdline tool: Select the path of JLinkGDBServerCL.exe(provided in the J-Link software)
- Endianess of the target: The current version of CoIDE only support Cortex-M series. So we only need to use Little endian.
4. Advance Function: Click "Edit script" button to open scripts edit window, you can edit the gdb script which you want to execute after the target reset.
CoIDE User Guide (for 1.5.1)