Skip to content

Commit be22fbe

Browse files
Apply suggestions from code review
Co-authored-by: Karl Söderby <[email protected]>
1 parent 662d5e5 commit be22fbe

File tree

1 file changed

+12
-11
lines changed
  • content/hardware/02.hero/boards/uno-r4-wifi/tutorials/debugger

1 file changed

+12
-11
lines changed

content/hardware/02.hero/boards/uno-r4-wifi/tutorials/debugger/debugger.md

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
---
22
title: 'Debugging the Arduino UNO R4 WiFi'
3-
description: 'Learn how to debug the UNO R4 WiFi.'
3+
description: 'Learn how to debug the UNO R4 WiFi with the Arduino IDE.'
44
tags:
55
- Debugger
66
- IDE
77
author: 'Hannes Siebeneicher'
88
---
99

10-
Debugging is the process of identifying and fixing errors in your code. It’s a vital skill for anyone writing code especially when dealing with microcontrollers like those on your Arduino. As with everything, debugging can be done at different levels, you can read up on the topic [here](/learn/microcontrollers/debugging).
10+
Debugging is the process of identifying and fixing errors in your code. It’s a vital skill for anyone writing code especially when dealing with microcontrollers like those on your Arduino.
1111

12-
In this context, debugging is a term used to describe the process of inspecting the code at different points in time.
12+
In this article, we will focus on using the Arduino IDE's built-in debugger, which can be used to debug the UNO R4 WiFi over USB. We will go through how to:
13+
- Enable debugging mode in the Arduino IDE
14+
- Create breakpoints for where we want to inspect the code
15+
- Monitor the value of a variable at a specific point in the program
1316

14-
An analogy that is often used is to think of it as "stepping into" the code, grabbing full control of the clock and walking through it line by line, checking the value of variables as you go, and reading specific memory addresses to make sure information is being passed on as intended.
17+
Note that you **do not** need an external debugger to follow this tutorial.
1518

16-
This is especially helpful when creating complex projects, but even as a beginner, it can be helpful to know the basics of debugging, consequently saving you time and energy when trying to find the little annoying error causing your program to break down.
17-
18-
This article covers the basic steps for debugging the UNO R4 WiFi using the IDE, such as setting breakpoints. A breakpoint is an intentional stopping or pausing place at a specific point in the code, allowing you to read values at that exact point. In this case, we will be using the Arduino IDE which we can use to set breakpoints, read out memory addresses, and read the value of any variable at a specific point in time.
19+
***To learn more about general debugging principles, you can read up on the topic [here](/learn/microcontrollers/debugging).***
1920

2021
## Goals
2122

@@ -32,7 +33,7 @@ The goals of this tutorial are:
3233

3334
## Debugging
3435

35-
Debugging your Arduino project allows you to dive deep into your code and troubleshoot as well as analyze the code execution. Yu can gain full access to the microcontroller's internal registers, memory, and variables. This is especially helpful when working on more complex projects where understanding the code execution flow is crucial. With the Arduino IDE you can step through the code line by line, allowing you to analyze why your code might break at a specific point.
36+
Debugging your Arduino project allows you to dive deep into your code and troubleshoot as well as analyze the code execution. You can gain full access to the microcontroller's internal registers, memory, and variables. This is especially helpful when working on more complex projects where understanding the code execution flow is crucial. With the Arduino IDE you can step through the code line by line, allowing you to analyze why your code might break at a specific point.
3637

3738
## Connection
3839

@@ -42,19 +43,19 @@ The only thing you need to do is to connect your UNO R4 WiFi to your computer us
4243

4344
### Setting up the Arduino IDE
4445

45-
First, if you haven't done it yet, install the [Arduino IDE](https://www.arduino.cc/en/software). It's a good ieda to verify that everything is working as it should by uploading the Blink example.
46+
First, if you haven't done it yet, install the [Arduino IDE](https://www.arduino.cc/en/software). It's a good idea to verify that everything is working as it should by uploading the Blink example.
4647

4748
![Blink Example](./assets/blink_example.png)
4849

4950
## Set Correct Programmer
5051

51-
To access and debug the mcu it's important that we set the correct programmer. Select **Tools** > **Programmer** > **ARM CMSIS-DAP compatible**.
52+
To access and debug the Arduino's MCU it's important that we set the correct programmer. Select **Tools** > **Programmer** > **ARM CMSIS-DAP compatible**.
5253

5354
![Set Programmer](./assets/set_programmer.png)
5455

5556
## Setting Breakpoints
5657

57-
As mentioned above a breakpoint is an intentional stopping or pausing place at a specific point in the code. You can add them by clicking the sidebar next to your sketch, and you should see a red dot appear. You have now set a breakpoint.
58+
A breakpoint is an intentional stopping or pausing place at a specific point in the code. You can add them by clicking the sidebar next to your sketch, and you should see a red dot appear. You have now set a breakpoint.
5859

5960
![Setting a breakpoint](./assets/set_breakpoints.png)
6061

0 commit comments

Comments
 (0)