Closed
Description
Board
Any board
Device Description
Occurs on all Espressif development 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
Any sketch.
Debug Message
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
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.
Activity
svdrummer commentedon Jan 1, 2023
I have just been asking this question on the Arduino forum. I have started getting these files being added.
debug.cfg
debug_custom.json
esp32.svd
me-no-dev commentedon Jan 2, 2023
they are required for JTAG debugging with Arduino IDE 2.0.3+
IeiuniumLux commentedon Jan 3, 2023
@me-no-dev, The above 3 files are also now generated with the classic Arduino 1.8.19 IDE during the uploading. Why does the former IDE now require those files too?
me-no-dev commentedon Jan 3, 2023
@IeiuniumLux it does not, but we can not detect which version is the IDE in order to copy them only on the new one
HomeSpan commentedon Jan 3, 2023
@me-no-dev, Can the output be an option that is selected from the tool menu, similar to setting the "Core Debug Level" or "Erase all Flash Before Sketch Upload"? Perhaps something like "Output JTAG files" where the default is "No" so that the files would never be output in version 1 of the Arduino IDE and would be optionally output in version 2?
Separately, is there anything in either "platform.txt" or "programmers.txt" that we can edit to disable the JTAG output?
me-no-dev commentedon Jan 3, 2023
@HomeSpan I'm not sure if it's possible to be controlled by an option, but could be tried. You can remove those lines to disable copy to sketch folder
tobozo commentedon Jan 3, 2023
does it have to be the sketch folder?
looks like an additional entry in .gitignore files will be required for the meantime
me-no-dev commentedon Jan 3, 2023
@tobozo it has to be the sketch folder, because that is where the IDE is looking for
debug_custom.json
and is also the current folder for gdb/openocd (and where they can find the other files). Maybe this is a temporary thing and more flexibility will be added to the IDE in the future. I am looking into only doing it when debug is enabled also. I will add the files to gitignore in a bit.tobozo commentedon Jan 3, 2023
@me-no-dev I've edited the platform.txt as per your recommendation.
If suggesting a different place is possible, it would certainly make sense to find those debug files in the same folder as the ELF file (near the build.options.json), where some debug material already exists.
me-no-dev commentedon Jan 3, 2023
@tobozo we have no control over that part or I would have used the build folder as well.
Anyway, I created this PR that adds gitignore and copies the files only if JTAG adapter is selected (or particular build variable is set to 1)
@IeiuniumLux @HomeSpan PTAL
20 remaining items