Skip to content

Commit 6c99114

Browse files
committed
Update IDE 2.x J-Link tutorial for new debug_custom.json data format
A major reworking of the Arduino IDE 2.x debugger configuration system was released in Arduino IDE 2.3.0. This included a breaking change to the data structure of the debug_custom.json file that allows the user to adjust the debugger configuration. The tutorial for using the Arduino IDE 2.x debugger with a J-Link debug probe requires the use of the debug_custom.json feature. The change to the file's data structure rendered that part of the tutorial outdated. It is hereby updated to use the new data structure. Including instructions for the different debug_custom.json structure that would be required for users of versions of Arduino IDE 2.x older than 2.3.0 would have added significant complexity to an already dense tutorial, making it significantly less approachable to the reader and prone to misinterpretation. For this reason, the decision was made to specify a requirement of Arduino IDE 2.3.0 as the minimum for the tutorial.
1 parent 159353c commit 6c99114

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

Diff for: content/hardware/01.mkr/01.boards/mkr-wifi-1010/tutorials/mkr-jlink-setup/mkr-jlink.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: This tutorial teaches you how to set up a MKR board with the Segger
99
This tutorial will show you how to debug an Arduino sketch using an Arduino MKR board and the Segger J-Link probe. It will go through how to connect these and use the Arduino IDE 2 to then debug a sketch.
1010

1111
### Required Hardware and Software
12-
- [Arduino IDE 2](https://www.arduino.cc/en/software)
12+
- [Arduino IDE](https://www.arduino.cc/en/software) version 2.3.0 or higher
1313
- Segger J-link device ([EDU](https://store.arduino.cc/products/j-link-edu) or [BASE](https://store.arduino.cc/products/j-link-base-compact))
1414
- [Arduino MKR WiFi 1010](https://store.arduino.cc/mkr-wifi-1010) (other boards from the MKR family works as well).
1515
- Soldering equipment
@@ -72,14 +72,19 @@ Select **Tools > Programmer > Segger J-Link** from the Arduino IDE menus.
7272
Now go to the folder where the sketch is located. Add a `.json` file in the same folder as your sketch and name it `debug_custom.json`. The easiest way would be to create a text file and rename it `debug_custom.json`. In the `.json` file, add the following lines:
7373

7474
```arduino
75-
{
76-
"servertype": "jlink",
77-
"device": "ATSAMD21G18",
78-
"interface": "SWD",
79-
"serverpath": "C:/Program Files/SEGGER/JLink/JLinkGDBServerCL"
80-
}
75+
[
76+
{
77+
"configId": "arduino:samd:mkrwifi1010:programmer=jlink",
78+
"servertype": "jlink",
79+
"device": "ATSAMD21G18",
80+
"interface": "SWD",
81+
"serverpath": "C:/Program Files/SEGGER/JLink/JLinkGDBServerCL"
82+
}
83+
]
8184
```
8285

86+
If you are using a board other than the **MKR WiFi 1010**, you will need to adjust the `arduino:samd:mkrwifi1010` part of the `configId` field. Hover the mouse pointer over the board selection in the Arduino IDE toolbar in order to learn the correct identifier for the board you are using.
87+
8388
The `"serverpath"` field needs to be set to the path of the "J-Link GDB Server CL" tool executable file that is located under the folder of the J-Link package you installed in the previous step. The file is named:
8489

8590
- **If you are using Windows:** `JLinkGDBServerCL.exe`

0 commit comments

Comments
 (0)