Skip to content

Instantly share code, notes, and snippets.

@tacamDev
Created July 25, 2023 18:58
Show Gist options
  • Save tacamDev/cf2b6b71e0c93bd5755eb428e47dd9bc to your computer and use it in GitHub Desktop.
Save tacamDev/cf2b6b71e0c93bd5755eb428e47dd9bc to your computer and use it in GitHub Desktop.
ESP32 JTAG Debugging

Debugging ESP32

How to use esp-prog jtag debugger:

  • Wire esp-prog to ESP32 device zadig option
  • In vscode, add debug_tool = esp-prog and upload_protocall = esp-prog to platformio.ini
  • Download Zadig and run it
  • Go to "Options" tab and check "List All Devices" zadig option
  • Select "Dual RS232-HS (Interface 0)" in the drop down menu zadig select
  • Press "Replace Drivers" with "WinUSB" driver selected zadig replace
  • In vscode, press "Run" -> "Start Debugging" or F5 to begin debugging
  • Note: You may have to do this again in the future if windows deicides to reinstall the default drivers

Debugging ESP32-S3

How to use builtin usb jtag debugger:

  • Plug usb cable into "USB" port on esp32-s3
  • In vscode, add debug_tool = esp-builtin to platformio.ini
  • Download Zadig and run it
  • Go to "Options" tab and check "List All Devices" zadig option
  • Select "USB JTAG/serial debug unit (Interface 2)" in the drop down menu zadig select
  • Ensure "Install Driver" is selected
  • Press "Replace Drivers" with "WinUSB" driver selected zadig replace
  • In vscode, press "Run" -> "Start Debugging" or F5 to begin debugging
  • Note: You may have to do this again in the future if windows deicides to reinstall default the drivers

Useful .ini settings

build_type = debug
debug_init_break = tbreak setup
build_flags = -O0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment