Hi Steven,
I uninstalled VSC and then removed the â.vscodeâ and â.platformioâ folders.
Installed VSC from scratch and installed the PlatformIO plugin.
I went to the project you linked and this is my platformio.ini file using your file as template.
[env:DEBUG]
platform = espressif32
board = esp32-s3-devkitc1-n8r2-dts
framework = arduino
; Debug build settings
build_type = debug
build_unflags = -Os
build_flags =
-Og ; Optimize for debugging
-g3 ; Maximum debug info
-DARDUINO_USB_CDC_ON_BOOT=1 ; Enable USB CDC
-DDEBUG_SETUP ; Enable setup() breakpoint spin loop
; Debug tool configuration
debug_tool = esp-builtin
debug_speed = 5000
; Initialize debugger at setup
debug_init_break = tbreak setup
; Extra debug commands
debug_extra_cmds =
set complaints 0
set print pretty on
mon reset halt
; Upload settings
upload_speed = 921600
It did not work (Spent two days trying to get some help from Gemini AI which sucks). Easily more than 100 runs with the most bizarre commands and flags changes running in circles.
The problem is that the debugger starts dumping its endless lines and halts at PC=0x40000400
But the GUI is completely lost:
-
The CALL STACK has the message âPaused on exceptionâ and nothing else, not even plain adresses of different stack levels (probably because it is stuck at the start of the code). At least it is consistent with the DEBUG LOG.
-
The DEBUG toolbox is âlost in spaceâ with the PAUSE button enabled (despite the processor being halted) having no clue the processor is stopped.
-
The DEBUG console at the bottom is as lost as the DEBUG toolbox and will not accept any command other than an âinterruptâ and only then both DEBUG toolbox and DEBUG console will be consistent with the debugger state, and the DEBUG console will accept other commands. But because we are still at the entrypoint, no source code can be highlighted.
This is the tail of the DEBUG LOG with my âinterruptâ command and a final âcontinueâ that never reaches my Setup() function.
Info : [esp32s3.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32s3.cpu1] Debug controller was reset.
Info : [esp32s3.cpu1] Core was reset.
[esp32s3.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
[esp32s3.cpu1] Debug controller was reset.
[esp32s3.cpu1] Core was reset.
Info : [esp32s3.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
[esp32s3.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
PlatformIO: Initialization completed
PlatformIO: Resume the execution to debug_init_break = tbreak setup
PlatformIO: More configuration options â
Note: automatically using hardware breakpoints for read-only addresses.
interrupt
{âtokenâ:12,âoutOfBandRecordâ:
,âresultRecordsâ:{âresultClassâ:âdoneâ,âresultsâ:
}}
Info : [esp32s3.cpu0] Target halted, PC=0x40041A76, debug_reason=00000000
Info : Set GDB target to âesp32s3.cpu0â
[esp32s3.cpu0] Target halted, PC=0x40041A76, debug_reason=00000000
Set GDB target to âesp32s3.cpu0â
Info : [esp32s3.cpu1] Target halted, PC=0x40043A40, debug_reason=00000000
[esp32s3.cpu1] Target halted, PC=0x40043A40, debug_reason=00000000
Program
received signal SIGINT, Interrupt.
0x40041a76 in ?? ()
continue
Continuing.
{âtokenâ:16,âoutOfBandRecordâ:
,âresultRecordsâ:{âresultClassâ:ârunningâ,âresultsâ:
}}
I am showing you this so you get the feedback I promised to post, when I had the time to test it and not that you try to find out the problem.
I can not believe that being the ESP32-S3 already 5 years old, I am having so much trouble getting the USB-JTAG interface working for a DEBUG session. Clearly from your experience it is not everybodies problem.
Could this be solved paying for support? I doubt it!
Thanks for your code example. I am wondering if my ESP32-S3-DevKitC-1-N8R2 might be faulty?
Frustrating as hell. I really regret having chosen ESP32-S3-WROOM for the 10 prototype boards that are already in the manufacturing process (a 6 sided PCB with more than 570 components each and a lot of money spent).
Sorry for the rant!