Skip to content

Commit d928e38

Browse files
committed
Apply feedback
1 parent 1806e4c commit d928e38

File tree

1 file changed

+23
-19
lines changed
  • content/hardware/03.nano/boards/nano-esp32/tutorials/debugging

1 file changed

+23
-19
lines changed

content/hardware/03.nano/boards/nano-esp32/tutorials/debugging/debugging.md

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,26 @@ Debugging is an essential skill for anyone working with technology, whether you'
2727
- [Arduino IDE](https://www.arduino.cc/en/software)
2828
- [Arduino ESP32 Core](https://github.com/arduino/arduino-esp32) installed (2.0.12 or newer)
2929

30-
## IDE Setup
30+
***It's important to use the "Arduino ESP32 Boards" by "Arduino" and not the "esp32" by "Espressif Systems". For Windows users this is paramount, otherwise no drivers will be ever installed and no debugging can be performed.***
31+
32+
## System Setup
33+
34+
### Debugging on Linux
35+
36+
When debugging on a Linux machine you may encounter the following error, due to your user not having the authorization to connect:
37+
38+
```
39+
Error: libusb_open() failed with LIBUSB_ERROR_ACCESS
40+
Error: esp_usb_jtag: could not find or open device!
41+
```
42+
43+
To fix this, you can copy [this file](https://raw.githubusercontent.com/espressif/openocd-esp32/master/contrib/60-openocd.rules) in your `/etc/udev/rules.d/` folder (as root).
44+
45+
### Debugging on Windows
46+
47+
On Windows machines it's important to accept the driver installation when prompted during the core installation.
48+
49+
### IDE Setup
3150

3251
To use the debugging feature on the Nano ESP32, you need to have the IDE 2.2.0 or a newer version installed. After you install it, you have to configure the IDE as follows:
3352

@@ -75,33 +94,18 @@ Before starting a debug session you need to upload your sketch using one of the
7594

7695
- Select the port next to the **USB symbol** and upload a sketch like normal.
7796

78-
### After Successful Upload
97+
### Manual Reset
7998

8099
After uploading a sketch using **either** Method 1 or Method 2 make sure to also **manually reset** the board by pressing the reset button **once**. Otherwise, it may not properly connect via USB and not show up inside the IDE.
81100

101+
### Start Debugging
102+
82103
Finally, after completing all necessary steps above the last step is to start the debugging sessions via the **Start Debugging** button found at the top of the IDE next to the Upload button.
83104

84105
![Start Debugging](./assets/startDebugging.png)
85106

86107
***Note: During the upload you will see a debug_custom.json appear in the file view. If you want to debug using another board it's important that you delete this file otherwise the IDE will use the wrong debugger and fail. You can find the file inside your sketch folder, typically at `~/documents/Arduino/<yoursketch>`***
87108

88-
### Debugging on Linux
89-
90-
When debugging on a Linux machine you may encounter the following error, due to your user not having the authorization to connect:
91-
92-
```
93-
Error: libusb_open() failed with LIBUSB_ERROR_ACCESS
94-
Error: esp_usb_jtag: could not find or open device!
95-
```
96-
97-
To fix this, you can copy [this file](https://raw.githubusercontent.com/espressif/openocd-esp32/master/contrib/60-openocd.rules) in your `/etc/udev/rules.d/` folder (as root).
98-
99-
### Debugging on Windows
100-
101-
On Windows machines it's important to accept the driver installation when prompted when the core is installed.
102-
103-
### Start Debugging
104-
105109
After starting the debugging session you have to press the continue button **several times** until you reach your main sketch and the breakpoints you set. This is due to how the recovery system works is expected behavior.
106110

107111
![Continue Button](./assets/continueBtn.png)

0 commit comments

Comments
 (0)