You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/04.pro/carriers/portenta-breakout/tutorials/breakout-jlink-setup/breakout-jlink-setup.md
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ This tutorial will show you how to debug an Arduino sketch using the Portenta H7
27
27
## Instructions
28
28
### 1. Setting up with the Arduino IDE
29
29
30
-
First, if you haven't already, install the [Arduino IDE](https://www.arduino.cc/en/software) and connect your Portenta H7. When uploading a sketch to your Arduino board with the Arduino IDE, it will build an .ELF file of the sketch. We will need this file to debug in Ozone in the next step. To easily find the file path to the .ELF file, we can enable the show verbose output option in the Arduino IDE. To do this, open up the preferences under **File > Preferences** in the Arduino IDE.
30
+
First, if you haven't done it yet, install the [Arduino IDE](https://www.arduino.cc/en/software) and connect your Portenta H7. When uploading a sketch to your Arduino board with the Arduino IDE, it will build an .ELF file of the sketch. We will need this file to debug in Ozone in the next steps. To easily find the file path of the .ELF file, we can enable the show verbose output option in the Arduino IDE. To do this, open up the preferences under **File > Preferences** in the Arduino IDE.
31
31
32
32

33
33
@@ -37,7 +37,7 @@ When you have the preferences window open, look for the **Show verbose output du
37
37
38
38
Now we are ready to upload the script that we want to debug. If you don't have a sketch to test, you can use the example sketch found in the **Conclusion** section of this tutorial.
39
39
40
-
When we upload the sketch with the Arduino IDE, we need to know where the .ELF file will be saved. Build your project in the Arduino IDE, and highlight the output directory, it could look for example like `C:\Users\profile\AppData\Local\Temp\arduino_build_815037`. Note down the path for easier access in the next step.
40
+
When we upload the sketch with the Arduino IDE, we need to know where the .ELF file will be saved. Build your project in the Arduino IDE and highlight the output directory; it should look for example like `C:\Users\profile\AppData\Local\Temp\arduino_build_815037`. Note down the path for easier access in the next step.
41
41
42
42

43
43
@@ -49,41 +49,41 @@ First, connect the Portenta H7 to the Breakout. To begin using the J-link device
49
49
50
50
### 3. Using the Setup with Segger Ozone
51
51
52
-
Download and install [Segger's Ozone debugger](https://www.segger.com/downloads/J-link/#Ozone). If you are on windows, make sure to also download the [J-Link Software and Documentation Pack for Windows.](https://www.segger.com/products/debug-probes/j-link/tools/j-link-gdb-server/about-j-link-gdb-server/)
52
+
Download and install [Segger's Ozone debugger](https://www.segger.com/downloads/J-link/#Ozone). If you are on Windows, make sure to also download the [J-Link Software and Documentation Pack for Windows.](https://www.segger.com/products/debug-probes/j-link/tools/j-link-gdb-server/about-j-link-gdb-server/)
53
53
54
-
When starting Ozone, make sure to enter the correct CPU into the settings box. The Portenta H7 uses the **STM32H747XI**, you can then chose between the M4 and M7 core on the Portenta.
54
+
When starting Ozone, make sure to enter the correct CPU into the settings box. The Portenta H7 uses the **STM32H747XI**; you can then choose between the M4 and M7 core on the Portenta.
55
55
56
56

57
57
58
-
Continue to the next step. Here we need to change the **Target Interface** to **SWD**. The Portenta H7 does not support JTAG. Then select your J-link device in the list of emulators and head to the next page.
58
+
Continue to the next step. Here you need to change the **Target Interface** to **SWD**. The Portenta H7 does not support JTAG. Then select your J-link device in the list of emulators and head to the next page.
Now you get to the window that asks you to select the program to be debugged, this is where you load the project's .ELF file. With the temporary output path that we noted before. Navigate to the correct directory, and select the .ELF file.
62
+
Now you get to the window that asks you to select the program to be debugged, this is where you load the project's .ELF file with the temporary output path that we noted before. Navigate to the correct directory, and select the .ELF file.
In the 'optional settings' dialog, set both options 'Initial PC' and 'Initial Stack Pointer' to 'Do not set' as it would skip the Arduino bootloader otherwise which may prevent the sketch from running correctly.
66
+
In the 'optional settings' dialog, set both options 'Initial PC' and 'Initial Stack Pointer' to 'Do not set' as it would skip the Arduino bootloader, otherwise this may prevent the sketch from running correctly.
When the setup is finished Ozone will open the file containing the main function. You will note that this is not the .ino sketch you wrote since this is an abstraction layer generated by the IDE. To open our .ino sketch we need to go to **Find > Find source file** in the top toolbar.
70
+
When the setup is finished, Ozone will open the file containing the main function. You will note that this is not the .ino sketch you wrote since this is an abstraction layer generated by the IDE. To open our .ino sketch we need to go to **Find > Find source file** in the top toolbar.
71
71
72
72

73
73
74
-
In the little window that appears, type ".ino". You should now be able to see the file, select the file and it will open it in Ozone.
74
+
In the little window that appears, type ".ino". You should now be able to see the file, select the file and open it in Ozone.
Now you are ready to start debugging. Simply go to **Debug > Download & Reset Program** to start debugging your sketch, you can add breakpoints , inspect variables, halt the execution and more.
78
+
Now you are ready to start debugging. Simply go to **Debug > Download & Reset Program** to start debugging your sketch: you can add breakpoints , inspect variables, halt the execution and more.
79
79
80
80

81
81
82
82
For more information about the features present in the Ozone debugger, please go [here.](https://www.segger.com/products/development-tools/ozone-j-link-debugger/technology/application-debugging/)
83
83
84
84
## Conclusion
85
85
86
-
In this tutorial, you learned how to connect your Portenta H7 and Breakout board to a J-link device and use it with the Ozone debugger. We also went through how to create a file with Arduino IDE that can be debugged in Ozone. And finally how to use the Ozone debugger to debug an Arduino sketch.
86
+
In this tutorial, you learned how to connect your Portenta H7 and Breakout board to a J-link device and use it with the Ozone debugger. We also went through how to create a file with Arduino IDE that can be debugged in Ozone. And eventually how to use the Ozone debugger to debug an Arduino sketch.
0 commit comments