Sysprogs forums › Forums › VisualGDB › Programming and Debugging ESP32-C3/C6 Arduino Projects with JTAG
- This topic has 5 replies, 3 voices, and was last updated 3 weeks, 1 day ago by
arrow201.
-
AuthorPosts
-
March 17, 2026 at 12:17 #37168
NKK72
ParticipantThe fix_project.py script is designed to configure VisualGDB projects for JTAG debugging with ESP32-C3 or ESP32-C6 Arduino projects. It automates the process of applying the necessary settings to the .vgdbproj file, ensuring compatibility with the ESP32 debugging setup.
To use the script, follow these steps:
1. Place the fix_project.py script in the root directory of your VisualGDB project, where the .vgdbproj file is located.
2. Manually copy the boot_app0.bin file into the root directory of your project. You can find this file in the Arduino ESP32 package directory: C:\Users[USERNAME]\Documents\ArduinoData\packages\esp32\hardware\esp32[VERSION]\tools\partitions\boot_app0.bin
3. Open a terminal (Command Prompt or PowerShell) and navigate to the project directory.
4. Run the script using the following command: python fix_project.py [esp32c3|esp32c6] Replace [esp32c3|esp32c6] with the chip you are using (e.g., esp32c3 for ESP32-C3).
5. The script will:
• Create a backup of the .vgdbproj file before making any changes.
• Update the CommandLine section to include the correct JTAG configuration for the selected chip.
• Enable ProgramMode in the project file.
• Replace the StartupCommands section with the necessary GDB commands for flashing and debugging.
• Ensure AutoDetectRTOS is enabled.
• Set the correct path for GDBBinaryOverride to point to the ESP32 GDB executable.
6. After running the script, reload the project in Visual Studio.
7. Press F5 to start debugging. The project should now be correctly configured for JTAG debugging with ESP32-C3 or ESP32-C6.
8. Important: If you make any changes to the VisualGDB Project Properties, you must run the fix_project.py script again to reapply the necessary configurations.
This script simplifies the setup process, ensuring all required configurations are applied automatically. If you encounter any issues, double-check the project file and ensure all dependencies are correctly installed.-
This topic was modified 3 weeks, 6 days ago by
NKK72.
Attachments:
You must be logged in to view attached files.March 17, 2026 at 12:27 #37171NKK72
ParticipantThis script has been created and tested with VisualGDB 6.1 and Visual Studio 2022.
March 18, 2026 at 08:23 #37172support
KeymasterThanks for sharing this.
March 21, 2026 at 13:25 #37179arrow201
ParticipantNKK72, I really appreciate the effort in this as I’ve been looking for a few years how to set breakpoints/debug the newer ESP32 series under Arduino. I was hoping this would also work for an S3 board, but it doesn’t for me. 🙁 I modded the fix_project.py script, adding esp32-s3 as an option, but I guess it’s not that straight forward? My board is a pretty standard ESP32-S3 dev board with 2 x USB, one that can used for JTAG. I do get “Connection Test Succeeded” when I run the JTAG test. The fix_project.py script also appears to run without errors. I’ve enclosed screenshots if that may lead to any clues. Thanks!
Attachments:
You must be logged in to view attached files.March 22, 2026 at 12:52 #37186NKK72
ParticipantI spent at least 10 hours the day before yesterday trying to get an ESP32-S3 working. It’s a completely different processor with a different core. I somehow managed to get the firmware upload working. But I couldn’t get the debugger to find the source codes. On top of that, the communication with GDB couldn’t be made stable either. It looks like for now, it just can’t be done
-
This reply was modified 3 weeks, 1 day ago by
NKK72.
March 22, 2026 at 13:02 #37188arrow201
ParticipantNKK72, thank you for your reply. Yaaa, I was afraid it wasn’t that easy. My next order will be some C3/C6 boards to try. Thanks again! 🙂
-
This topic was modified 3 weeks, 6 days ago by
-
AuthorPosts
- You must be logged in to reply to this topic.