Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) Hardware Debugging ESP32-S3 core using integrated JTAG over USB (Read 834 times)
StephenB
Newbies
*
Offline


Posts: 5
Joined: Feb 14th, 2024
Hardware Debugging ESP32-S3 core using integrated JTAG over USB
Feb 14th, 2024 at 5:42pm
Print Post  
I can get the debugger to start and I can see variables etc in the Auto window etc.

However when I attempt to step into core functions it throws an error. "unknown Stopping event"

Optimisation is off. The attached screenshot shows tthe configuration. I have a boards.txt file.

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2351
Joined: Feb 13th, 2019
Re: Hardware Debugging ESP32-S3 core using integrated JTAG over USB
Reply #1 - Feb 15th, 2024 at 1:37pm
Print Post  
Thanks for the report.

Can you attach the log file from your Build Folder "PSRAM_Test_N16R8_noide.ino_DebugGDB.log".

If you cannot see this please enable the settings at the top of the page and add the complete build output from your project for us to review.
  
Back to top
 
IP Logged
 
StephenB
Newbies
*
Offline


Posts: 5
Joined: Feb 14th, 2024
Re: Hardware Debugging ESP32-S3 core using integrated JTAG over USB
Reply #2 - Feb 15th, 2024 at 3:16pm
Print Post  
Hi,
I think the attached log file was from the same session.
Thanks
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2351
Joined: Feb 13th, 2019
Re: Hardware Debugging ESP32-S3 core using integrated JTAG over USB
Reply #3 - Feb 15th, 2024 at 3:51pm
Print Post  
Thanks for the log, there should also be another file "PSRAM_Test_N16R8_noide.ino_DebugOpenOCD.log".

When you next replicate it can you send the logs again as well, just in case there are any further clues.

I can replicate what appears to be the same issue stepping into delay() and various other functions, but only if I have 2 breakpoints already set.  If I reduce this to 1 then it seems to work OK.... do you have 2 or more breakpoints already set in your software?
  
Back to top
 
IP Logged
 
StephenB
Newbies
*
Offline


Posts: 5
Joined: Feb 14th, 2024
Re: Hardware Debugging ESP32-S3 core using integrated JTAG over USB
Reply #4 - Feb 15th, 2024 at 3:56pm
Print Post  
Log ans INO attached.

I have only 1 breakpoint.

I will rerun.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2351
Joined: Feb 13th, 2019
Re: Hardware Debugging ESP32-S3 core using integrated JTAG over USB
Reply #5 - Feb 15th, 2024 at 4:09pm
Print Post  
Thanks for the update, Can you confirm a specific function you get the error stepping into?

If you can also attach the full build output with the settings enabled shown at the top of the page it will allow us to see all the other options selected so we can replicate more accurately.
  
Back to top
 
IP Logged
 
StephenB
Newbies
*
Offline


Posts: 5
Joined: Feb 14th, 2024
Re: Hardware Debugging ESP32-S3 core using integrated JTAG over USB
Reply #6 - Feb 15th, 2024 at 4:56pm
Print Post  
The breakpoint was on:
Line 22 Serial.printf("Total PSRAM: %d\r\n", ESP.getPsramSize());
I then select stepin
the error is thrown in esp32.cpp @ line 155 which is the start of EspClass::getPsramSize(void).

I will email VM build log and the debug logs.
« Last Edit: Feb 15th, 2024 at 4:57pm by StephenB »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2351
Joined: Feb 13th, 2019
Re: Hardware Debugging ESP32-S3 core using integrated JTAG over USB
Reply #7 - Feb 16th, 2024 at 4:47pm
Print Post  
Thanks for the logs and we have setup the same sketch and debugging settings, however the issue (and errors in the logs) only seems to replicate for us when we have 2 breakpoints set in total.  If only 1 or 0 are set the stepping in and over works without generating the "unknown stopping event".

In the logs from GDB it shows it cannot insert the breakpoint:
&"Warning:\n"
&"Cannot insert breakpoint 0.\n"
&"Cannot access memory at address 0x42001842\n"

And due to the quirks of the ESP32 OpenOCD implementation this is most often due to there being 2 breakpoints already set, so when the step function tries to inject another breakpoint it fails as there are only 2 hardware breakpoints allowed at any one time.
https://docs.espressif.com/projects/esp-idf/en/v4.2-beta1/esp32/api-guides/jtag-...

We will continue looking at this as improving GDB's knowledge of the Flash Map may potentially help.

Do you have any disabled breakpoints set in the code or in files that aren't open? (the Debug > Windows > Breakpoints list can be used to see them all in one place)
  
Back to top
 
IP Logged
 
StephenB
Newbies
*
Offline


Posts: 5
Joined: Feb 14th, 2024
Re: Hardware Debugging ESP32-S3 core using integrated JTAG over USB
Reply #8 - Feb 27th, 2024 at 11:44am
Print Post  
Sorry for the delay.
I have checked and there is only one breakpoint shown in the Breakpoints window.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint