Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the instruction for debugging #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@ No changes need to be made to this file.

> **Note:** One thing I encountered was both the ESP32 target device as well as the ESP-Prog will enumerate as `/dev/ttyUSB0` if plugged in first on Linux. Since the debug commands rely on the target device port being constant it's important that you plug in the target device first if you've configured **settings.json** to use `/dev/ttyUSB0` as the flash and monitor port.

1. Attach the ESP-Prog to your target device via whatever JTAG cable is required.
1. Plug the target device (the one you want to debug) into your computer.
1. Press **Ctrl-Alt-T** to open the Task list in VSCode and select _Flash and Monitor Device_.
1. The device should successfully flash and start showing serial output if applicable.
1. Plug the ESP-Prog into your computer. The red LED should illuminate.
1. Start a debug session with **F5** or **Run->Start Debugging** from the menu.
1. Install the VS Code GDB extension https://marketplace.visualstudio.com/items?itemName=webfreak.debug
2. Attach the ESP-Prog to your target device via whatever JTAG cable is required.
3. Plug the target device (the one you want to debug) into your computer.
4. Press **Ctrl-Shift-P** to open the Task list in VS Code. Type 'Run Task' and press enter. Now select _Flash and Monitor Device_.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ctrl-Shift-P opens the Command Palette instead of the Task List. Let's change the wording to say that instead of "Task List" now.

5. The device should successfully flash and start showing serial output if applicable.
6. Plug the ESP-Prog into your computer. The red LED should illuminate.
7. Start a debug session with **F5** or **Run->Start Debugging** from the menu.

### Done 🤩
From this state you can makes changes and flash new firmware. Starting a new debug session will reset and halt your device at your application entry point.
Expand Down Expand Up @@ -112,4 +113,4 @@ The main branch of this repo is configured to work with version 4.2 of ESP-IDF.
## Donate a Burrito
This information is the result of hours upon hours of research and trial and error and is provided free to the community to hopefully help other ESP32 makers. That said, if you found this helpful or if it saved you time and you wanna say thanks in the form of a burrito, well, I'm not gonna stop you.

[Buy Me a Burrito](https://www.buymeacoffee.com/kevinsidwar) 🌯🌯🌯
[Buy Me a Burrito](https://www.buymeacoffee.com/kevinsidwar) 🌯🌯🌯