I have a bigger program for the ESP32. Using the ESP32 core 3.0.2.
Compiling it with the Arduino IDE 2.3.1 my exported .bin file is 996k.
Compiling it with the Arduino IDE 2.3.2 my exported .bin file is 1204k.
This is means an inflation of more than 20%!
Now I fear, that neccessary extensions to my program will no more fit into the ESP.
I did not find a possibility to downgrade the IDE to rev. 2.3.1 or install this older version separately. Is this possible?
If so, I'm going to ask you to provide the full verbose output from a compilation on each of them.
This procedure is not intended to solve the problem. The purpose is to gather more information.
Please do this:
Start Arduino IDE on the machine with 2.3.1 installed.
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus on the machine with 2.3.1 installed..
The "Preferences" dialog will open.
Check the box next to "Show verbose output during: ☐ compile" in the "Preferences" dialog.
Click the "OK" button.
The "Preferences" dialog will close.
Select Sketch > Verify/Compile from the Arduino IDE menus.
Wait for the compilation to finish.
Right click on the black "Output" panel at the bottom of the Arduino IDE window.
A context menu will open.
Select Copy All from the menu.
Open a forum reply here by clicking the "Reply" button.
Click the <CODE/> icon on the post composer toolbar.
This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
This will paste the compilation output into the code block.
Move the cursor outside of the code block markup.
Start Arduino IDE on the machine with 2.3.2 installed.
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus on the machine with 2.3.2 installed..
The "Preferences" dialog will open.
Check the box next to "Show verbose output during: ☐ compile" in the "Preferences" dialog.
Click the "OK" button.
The "Preferences" dialog will close.
Select Sketch > Verify/Compile from the Arduino IDE menus.
Wait for the compilation to finish.
Right click on the black "Output" panel at the bottom of the Arduino IDE window.
A context menu will open.
Select Copy All from the menu.
Open a forum reply here by clicking the "Reply" button.
Click the <CODE/> icon on the post composer toolbar.
This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
This will paste the compilation output into the code block.
Click the "Reply" button to post the output.
In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here.
Open a forum reply here by clicking the "Reply" button.
Click the "Upload" icon () on the post composer toolbar:
The "Open" dialog will open.
Select the .txt file you saved from the "Open" dialog.
Click the "Open" button.
The dialog will close.
Click the "Reply" button to publish the post.
Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.
I experienced the increase of the code as well but when running I was happy to notice that it uses less memory. I didn't investigate in detail which library did what.
Both compilations ran on the same machine.
But after reinstalling the IDE 2.3.1 I found, that the code size is more or less the same with 2.3.2.
Now I realized, that I after a long period of waiting I confirmed to update all the overdue libs AFTER the most recent compilation with the originally installed IDE 2.3.1 (weeks ago).
So it means the reason for the inflation is not the IDE 2.3.2, but one of the libs which will be hard to find...
@ptillisch
with the IDE 2.3.2 installed this morning, and after the REinstallation of the IDE 2.3.1 I got a compiler warning during compilation of this program which never came up during the compilation with the originally installed IDE 2.3.1:
warning: 'B00000100' is deprecated: use 0b00000100 instead [-Wdeprecated-declarations]
For me it is a sign, that beside the modified libs, the REinstalled version of the IDE 2.3.1 is also not identical with the originally installed version. How can this come?
I suspect that your conclusion is not correct. The IDE only reports to you what the compiler tells it; the only difference I can think of is the warning levels that you have set in file/preferences in the IDE between the two installations as that way the IDE tells the compiler what to show.
I cannot remember that I ever changed something in the preferences except the board-manager URLs.
Compiler warnings are set "Default" and I never saw a reason to change this...
An ESP32 board package needs to be installed; the compiler is provided by the board package.
IDE 2.3.2 does not come with any board package; the AVR board package is installed when you run the IDE for the first time. That way it's guaranteed that you have the latest (and possibly greatest) version.
IDE 1.x comes with the AVR board package that was relevant at the time of release of the IDE and that is installed when you install the IDE. E.g. IDE 1.8.19 comes with AVR board package 1.8.3 (and current board package version is 1.8.6).
You omitted some of the useful information from the warning. Do you see it if you compile once more?
Arduino IDE caches the compiled objects from the boards platform's core and from libraries. In order to reduce the compilation duration, on subsequent compilations, those objects are reused rather than compiling the core and libraries from source again. That cache will be used over and over again unless something significant changes:
The source code of the core or library changes (which includes updates to the boards platform or libraries)
The board or custom board options are changed (each board configuration has a separate cache)
Some external process deletes the cached files
A side effect of this caching is that you will only see the warnings generated by the core and library source code on the first compilation. Since that code is not compiled during subsequent compilations, you won't see them again.