-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Build with 2.5.0-dev is about 200k larger compared to 2.4.2 #5476
Comments
@TD-er , as for now you can go to your Arduino settings and change the extra board manager to: This will force you to use the previous one, while the new one is not stable yet (it is still a development branch) |
@vascojdb It was my intention to make a test build using 2.5.0, just to see what issues would arise. One of the issues I see is the rather big jump in binary size. |
@TD-er what happens if you disable exceptions? |
@devyte How do I disable them? |
Line 887 in 47d6f83
Notice the -lstdc++-nox as well, as opposed to -lstdc++ in the enabled case. |
Then I get a lot of these (and still too big, will also test the "buildable" minimal version too)
|
You need to update it with |
You can disable exceptions, and also select the lwIP 'no features' variant. |
Done and still these errors (ran a clean build too)
The files in the |
Is your local repository even with current master ? |
I personally removed the entire platform folder then used
and
In my platformio.ini file. Everything compiles fine and runs fine. |
@porkyneal With those settings, you're building with core 2.4.2. @d-a-v This repository you mean, I assume? After diner, I will also test to build in Linux to see if it makes a difference. |
@TD-er Did you try? Note the With those settings I have the very latest GIT being compiled, admittedly not the exact 2.5.0.beta.1. |
Don't rely on the tag as it currently stands. I expect to have to delete and remake it as soon as the currently ongoing work is finished. |
@porkyneal I just started a build with the feature/stage on a (slow) linux machine, so I can see it after diner. |
I have tried building using the staging version, with the same results. |
Deleting stuff, getting it again, etc. and using the following flags:
The last one to handle some parts in the code that have to change between core 2.4.2 and 2.5.0 The minimal build I started with, is now:
It is still about 17k larger compared to core 2.4.2. But when building any other env. in our project I get this:
Running
The text part being very close to 32k (0x7D6C = 32108 = 660 bytes left) makes it likely we will cross that one in no-time. What else can I do to make the iram usage smaller? |
try with |
Same result:
Edit: |
The flash size increasing by 17K, what is that compared to? Flash size is definitely not a design point, so it doesn't surprise me that there is some increase to go with the added functionality. The exceptions stuff you seem to have sorted, so I don't believe it's related to that (but might be things like the floating point support in printf, etc. which weren't in older releases). As for the IRAM(interrupt) issue, that should be looked at in both your code and the core. There's not much space to begin with and even the ESP SDK itself continues to increase in size there. I've given it an honest try, but as I'm not an Atom user, PlatformIO user, or a ESPEasy user, I can't for the life of me figure out how to build what you're building using the tools you're using and the updated bits (obviously in flux) that have to swap out the standard stuff. Following the Windows guide online, I got as far as getting Atom on my Linux box, getting PIO, and installing the 8266 branch from a .ZIP of the GH branch you referenced, but in addition to a espressif8266@src-eeabd... directory I see it snarfed a couple other 8266 and even ESP32 dirs in ~/.platformio. And it's been building something like 10 different versions of the ELF in the background as I've been typing. What you can do is increase the space allocated in the |
Thanks, I will do that this morning, to get an idea what is eating up all the iRAM. As Windows + PlatformIO is not in your normal Workflow, then you're far away from your normal comfort zone, I assume :) I will play around with the objdump, which looks to me like a very powerful tool, but I am yet unfamiliar with it. As far as I know, we are using ESP8266_NONOS_SDK, so I guess I need to add So I guess my first thing to do is to find the biggest users of the iRAM and then attribute them with |
I compiled vanilla / git head ESPEasy with arduino IDE.
I have both 2.4.2 and 2.5.0-beta1 map files. |
About building it, you may want to have a look at the build script I made in the tools directory of ESPeasy. |
I just added the 2.4.2 built files. N.B. there is also a 'core 2.4.1' version included, since we have that also in the nightly builds due to PWM issues with 2.4.2 Edit: |
Got 'em, thanks. |
The first big standouts I'm seeing are the 2 functions: Combined they are 1.3KB of code space, and they are only present in 2.5.0-b1. There was some I2C slave support added in 2.5.0-dev, but I was not following it much. @d-a-v or @devyte , any ideas? These are big functions now, where there were none before. |
Also in the same vein as this, there are |
|
I forgot to mention, in the platformIO config I used are the following disabled in 2.5.0 builds:
|
@d-a-v your dump was the key. Turns out the linker script was placing the C++ std libs into IRAM by default since the name was changed to enable non-exception-mode. With the 1-line PR IRAM is at 0x7c34 out of 0x8000 in the main ESPEasy build that I'm able to do, which is w/in limits. |
There's probably still more IRAM space savings that we can probably squeeze out, but the main issue is now cleared up. For now, @TD-er , once a new -beta2 release is done, your disabled exception builds should complete. |
Do you know 2.5 now uses BearSSL by default? That uses quite a bit more flash. |
I will include some 2.5.0-beta builds with our next nightly build, so some more people will test it. (let's hope they take the "beta" label and the warnings I add serious so we will not see reports like "I have now 2 dozen units I have to manually flash back"...) My test units running the 2.5.0 code feel a lot more stable with WiFi. |
glad to hear!
Did you instrument only number of loop/sec ? How much time spent in |
@d-a-v For example:
Or the graphical view with color highlighting the ones > 100 msec: There is also JSON output of it ;) Oh and the extravagant amount of checks for wifi connection status is a left-over which can be lowered a lot if WiFi is stable again :) |
What core version are you comparing with ? |
Maybe it's nothing, but the calls/sec # for some of these are double the indicated amount, no? |
That's correct. |
@earlephilhower the original issue here was bin size, and then iram. I think both have been handled. Can this be closed? |
I agree the size issues are indeed handled. |
Closing per previous comment. |
Dear Sirs, although this is a closed issue, today I compiled one of my Arduino sketch, using the master branch of the Arduino Core and I have a remarkable binary file increasing near if not even more of 200 KB. That I think is very much... Please see what can cause it. |
For me, setting the Arduino menu: "Tools -> Exceptions -> Disabled" solved it. |
Exceptions off should be the default after #5538 |
Correct, there is more work needed before they can be default-enabled. |
Dear Sirs, yes, you are absolute right, Exceptions off: Thanks |
Basic Infos
Platform
Settings in IDE
Problem Description
I was testing to see if I could build ESPeasy with core 2.5.0-beta1 using PlatformIO.
Almost all versions I tested of our project were either unable to build due to exceeding max_size limit, or have become so large they will be useless for their intended purpose.
As an example the
minimal_ESP8266_1024_OTA
env in our project:The last Travis build of the same environment using core 2.4.2 was:
Am I missing something very obvious?
Like including some library twice (maybe moved into the core) ?
Is it something I am doing wrong with creating a PlatformIO environment?
I just made a .tar.gz from the 2.5.0-beta1 tag and uploaded it to my server and mentioned it in the manifest.json.
The text was updated successfully, but these errors were encountered: