-
Notifications
You must be signed in to change notification settings - Fork 542
SDK is getting fat (relief inside) #162
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
Thanks for sharing that. I gave it a try in my project (I'm also compiling in mbedtls) and I saved about 2.2k. Modest but nice. |
I saved 448 bytes. Thank you.
|
Remove -O2 and you should save more (it overwrites the preceding -Os which is better). |
Thank you @kriegste
|
As a side note: |
@kriegste By the way, your gcc optimization is very wonderful, and we will add them next version. |
I personally do not use the AT firmware so I will not touch it. But after a quick look it seems there still is plenty of space between 0x01000 and 0x79000 (480 kB) and 0x81000 and 0xFB000 (488 kB). Editing the original ld file is necessary, I think. For example I am currently squeezing two (OTA) 492 kB images into a 1 MB flash without any problems.
|
You can try setting line 8 in and line 8 in Then recompile the AT projects and see if it fits now (it should). |
Added the following flags in the latest master branch
The internal lib is compiled by xt-xcc, and the xt-xcc does not support these flags. If compiling the internal lib using gcc with these flags, it seems more bigger, so I gave up. |
Thanks much for trying! |
Like most other software the SDK is getting bigger and bigger and some people might already hit a limit with their tiny EEPROMs. We soon will.
So I tried some gcc optimization switches and found out that
-fno-guess-branch-probability
-freorder-blocks-and-partition
-fno-cse-follow-jumps
in the Makefile save me a few kilobytes. I even recompiled lwip and mbedtls to save more. These switches only affect the automatic optimization process in gcc. They do not alter the function of the code.
So my request would be that Espressif compiled the other libs with these switches to find out if more space can be saved.
The text was updated successfully, but these errors were encountered: