max44
January 1, 2023, 3:38am
1
I have noticed over the last few days that, when i compile a sketch, i get three extra files added to the folder
debug.cfg
debug_custom.json
esp32.svd
it has only just started.
xfpd
January 1, 2023, 4:22am
2
When you refresh the screen, they should vanish.
max44
January 1, 2023, 4:59am
3
These are visible in windows file explorer. They stay there, even after Arduino IDE has been closed
xfpd
January 1, 2023, 5:21am
4
Same thing happens in Linux, but refreshing the window shows they were temporary.
Hi @max44 . The reason you are seeing these files now and not before is because you updated to the latest version of the ESP32 boards platform. This new feature was added in the latest 2.0.6 release of the platform:
espressif:master
← espressif:feature/ide_2_debug
opened 08:05PM - 23 Sep 22 UTC
#### General Info
- Currently the following debug methods are supported on all … boards (menu option is available for the official "Dev Module" boards):
- ESP32: FTDI Adapter (ESP-Prog or compatible)
- ESP32-S2: FTDI Adapter (ESP-Prog or compatible)
- ESP32-S3: Built-In USB JTAG (Requires proper USB Mode to be selected)
- ESP32-C3: Built-In USB JTAG
#### Known issues
- Debug sessions can not be restarted (not clear what is the cause yet)
- If debug session is closed or fails, openocd is left running by the IDE and to get around that, you either need to manually kill the process or restart the IDE (Issue seems to be in `cortex-debug`, but newer "fixed" versions also fail)
#### To-Do
- [x] Update the release script to update the path to `openocd-esp32` in `platform.txt`
- [x] Update the release script to add `tools/ide-debug` to the archive
- [x] Update the `lib-builder` to skip adding `-Os` to the build flags [ref](https://github.com/espressif/esp32-arduino-lib-builder/pull/90/commits/c3ecc1cb83cf3ae51695a70d647a3caeb43df4af)
- [x] Update the `lib-builder` to remove `CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK` from ESP32-C3 sdkconfig [ref](https://github.com/espressif/esp32-arduino-lib-builder/pull/90/commits/67aeeecbe8c700df271e088ed0fa547315ecc578)
- [x] Find out what is the issue on C3 and how/when it will be fixed
- [x] Find out why JTAG Port menu can not update the openocd script
- [x] Add default OpenOCD config for all boards
- [ ] Find out if it's possible to make debug target restart working
I haven't found the time to try debugging out on the ESP32 (I do have quite a bit of using it with the "Arduino SAMD Boards" platform), so I'm not sure why they configured the platform to add these files to the sketch, but I'm sure there is a good reason they did that.
In addition to the ESP32-specific information at the link I shared above, there is some additional information about the Arduino IDE 2.x integrated sketch debugger here:
1 Like
max44
January 1, 2023, 5:55am
7
Thank you. Must have updates. Was using Arduino V2 but it was buggy, so i moved back to old version and did an update.
I will read the link you shared. Thanks again.
max44
January 1, 2023, 6:00am
8
it is a recent bug in espressif. Error #7647
They are investigating it.
Thanks again
Thanks for sharing that information. I'll follow the issue to learn more about the subject matter.
In order to make the relevant information more accessible to all interested parties, I'll share a direct link to the issue here:
opened 10:01PM - 31 Dec 22 UTC
closed 08:41AM - 06 Jan 23 UTC
IDE: Arduino IDE
Priority: High
Status: Pending Merge
### Board
Any board
### Device Description
Occurs on all Espressif developmen… t boards
### Hardware Configuration
Nothing
### Version
other
### IDE Name
Arduino 1.8.19
### Operating System
MacOs 13.1
### Flash frequency
80 MHz
### PSRAM enabled
no
### Upload speed
921600
### Description
In the latest release (2.0.6), whenever you compile a sketch, the compiler is dropping three new files into the sketch folder: *debug.cfg*, *debug_custom.json*, and *esp32.svd*. These files have never appeared when compiling with version 2.0.5 or earlier. Is there a way of turning the automatic output of these files?
### Sketch
```cpp
Any sketch.
```
### Debug Message
```plain
None
```
### Other Steps to Reproduce
Compile any sketch with Arduino IDE 1.8.19 using the latest Arduino-ESP32 version 2.0.6 and the compiler drops three new files, presumably used for debugging/testing, in to the sketch folder.
### I have checked existing issues, online documentation and the Troubleshooting Guide
- [X] I confirm I have checked existing issues, online documentation and Troubleshooting guide.
1 Like
system
Closed
June 30, 2023, 6:51am
10
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.