Skip to content

Commit e96a7f8

Browse files
authored
Merge pull request #709 from per1234/update-debugger-tutorial
Update debugger tutorial for Arduino IDE >=2.0.3
2 parents 29cfba3 + c9ede0e commit e96a7f8

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

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

+11-6
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,23 @@ Now we are ready to start debugging our sketch. Connect the power to the MKR boa
6767

6868
Then create or open the sketch that you want to debug. If you don't already have a sketch in mind, feel free to use the example sketch found at the end of this tutorial.
6969

70-
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:
70+
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:
7171

7272
```arduino
7373
{
74-
"servertype": "jlink",
75-
"device": "ATSAMD21G18",
76-
"interface": "SWD",
77-
"serverpath": "C:/Program Files (x86)/SEGGER/JLink/JLinkGDBServer"
74+
"servertype": "jlink",
75+
"device": "ATSAMD21G18",
76+
"interface": "SWD",
77+
"serverpath": "C:/Program Files/SEGGER/JLink/JLinkGDBServerCL"
7878
}
7979
```
8080

81-
The `"serverpath"` needs to be changed to the location where you installed the J-link package in the previous step. When this is done, click on the debugging icon.
81+
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:
82+
83+
- **If you are using Windows:** `JLinkGDBServerCL.exe`
84+
- **If you are using Linux or macOS:** `JLinkGDBServer`
85+
86+
When you have finished creating the `debug_custom.json` file, click on the debugging icon.
8287

8388
![Start debug feature in Arduino IDE 2.0](assets/mkr_jlink_IDE_debugging_button.png)
8489

content/software/ide-v2/tutorials/ide-v2-debugger/ide-v2-debugger.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ Once your program has been uploaded, we can start using the debugger.
102102

103103
Let's begin by creating something called a **breakpoint**. Breakpoints are used to stop the program execution at a specific line (or when a specific condition is verified). We can use multiple of these in a program (the number is variable depending on the processor).
104104

105-
In this example, we are going to set a breakpoint for **line 33** and **line 36**. These are set by clicking to the left of the line numbering in the editor.
105+
In this example, we are going to set a breakpoint for **line 33** and **line 35**. These are set by clicking to the left of the line numbering in the editor.
106106

107107
![Navigating the Debugger.](assets/debugger-img03.png)
108108

109109
We can now go through our code, step by step.
110-
The first (automatic) stop will be triggered by the **Debugger** itself, and it will be a standard entry-point, ignore that for now.
110+
The debugger will automatically stop at the first breakpoint it reached.
111111

112-
Let's continue, by clicking on the **Play/pause** button (**Continue**). The program will now run to the first breakpoint, line 33. If we click it again, it will jump to line 36 (the lines 34 and 35 will still be executed but we won't see that). Clicking the **Play/pause** button again will continue running the program which will pause at its next breakpoint, line 33. We're in the main loop, after all.
112+
Let's continue, by clicking on the **Play/pause** button (**Continue**). The program will now run to the next breakpoint (e.g., line 35). If we click it again, it will jump to line 33 (the other lines in the program sequence will still be executed but we won't see that). Clicking the **Play/pause** button again will continue running the program which will pause at its next breakpoint, line 35. We're in the main loop, after all.
113113

114114
![Going between breakpoints.](assets/playpause.gif)
115115

0 commit comments

Comments
 (0)