-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Compiler creating debug.cfg, debug_custom.json, and esp32.svd files in my sketch folder under version 2.0.6 #7647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have just been asking this question on the Arduino forum. I have started getting these files being added. |
they are required for JTAG debugging with Arduino IDE 2.0.3+ |
@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? |
@IeiuniumLux it does not, but we can not detect which version is the IDE in order to copy them only on the new one |
@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? |
@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 it has to be the sketch folder, because that is where the IDE is looking for |
@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. |
@tobozo we have no control over that part or I would have used the build folder as well. @IeiuniumLux @HomeSpan PTAL |
can those debug tools eventually be chained with Arduino 1.8.x or is it only functional with IDE 2.0.3+ ? |
@tobozo since they are using a particular extension that the new IDE includes, it can not be made to work with earlier versions. 2.0.x versions before 2.0.3 also have it, but it's older version and does not work correctly. |
@me-no-dev thanks for clarifying what about using I don't know what's the
|
Unfortunately it is |
oh crap, so "fixing" it will break something else? looks like it's directly conflicting with arduino-cli platform specs
|
Would have been nice to be able to filter menu items this way as well, but... cant :) |
How about only generating those files in the sketch folder when the menu item/option Sketch->Optimize for Debugging is checked/enabled? I know it's not typical for sketches to be compiled for different board types but because the debugging setup files are being generated with every compile, specifically debug_custom.json, any debugging of that sketch with another board will error out unless it's another esp32 board. |
@dlarue that would sure save some github space [edit] and user storage too, especially the |
Wow @tobozo ya that'd be another side effect of only generating these JTAG debugger files, and project debugging symbols, etc no matter if the user is debugging or not. While I wish there were real menu options in the Tools menu for debugging, as the STM32 does, at the very least using the built-in Sketch->Optimize for Debugging seems a natural fit for this. BTW, before Espressif devs released 2.0.6 which added the debugging capabilities, I was hacking the packages and board files to add the compiler options to the esp32 build and it was functional or at least I saw the -Os -O3 etc options showing up in compiler output. It seemed natural in the STM32 package to set debugging in the Tools menu and to have that kind of resolution of controlling the build process. |
We added a menu for selecting if JTAG is enabled or not. If not, it will not copy the files. It will come out soon in 2.0.7. Optimization flags are something else and should not mix them together. |
if just doing JTAG or !JTAG then hopefully you're leveraging what Arduino IDE devs put in place on the Sketch menu with the "Optimize for Debugging" flag. Yes, compiler optimizations are another item and even I can do that by editing a couple of files and backing them up for when they get replaced by uprades like 2.0.6 -> 2.0.7. |
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
Debug Message
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
The text was updated successfully, but these errors were encountered: