-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Need Clarification for ESP-IDF (ESP32S2) memory footprint (IDFGH-5238) #7007
Comments
Hi @Darsh-Dev, Thanks for being patient while someone got back to you. To make sure we're discussing the same issue, in this case your concern is the application binary size in the flash rather than the RAM usage. Is that right? We're in the process of preparing a performance guide which includes sections on minimizing the binary size and also the RAM usage of an ESP-IDF app. Will link it to this issue once it's available. Regarding hello_world, in general ESP-IDF applications only link the code and data which is referenced by the application. However there is some system-level functionality that is included in every app by default even though it's not really used by very simple apps like hello world. (Features such as: high precision timer, task watchdogs, interrupt watchdogs, panic handler code). It is possible to trim some of these down but most non-trivial apps will either need or want them. Regarding the AWS IoT example, this app contains quite a lot of additional functionality (including the Wi-Fi stack, TCP/IP stack, a compliant TLS stack, and the relevant AWS SDK functionality). The default ESP-IDF configuration is also targeted for maximum functionality and easy debug-ability, rather than code size. One of the simplest size improvements is to change the compiler optimization level to Size. There are a number of other possible actions listed in the upcoming Performance Guide, will link to this as soon as it's available. The
These are metadata sections that are in the ELF file but not the binary file, so they don't affect the final binary size.
Literals are generated by the compiler to store values which can't be efficiently encoded in instructions. They contribute to the application binary size, generally the literal size is proportional to the size of the .text sections. |
Hi Team,
I want to understand the memory footprint of ESP-IDF. Hello-world example is taking by default 162816 bytes memory.
Why its consumed >150KB for simple hello world code?
esp-idf/examples/get-started/hello_world/build/hello-world
hello-world.map.txt
Also, I am trying with AWS IoT example code (additionally CLI, NVS, UART, WiFi, ESP-IDF SDK/libs).
Same basic example also consuming the 900KB memory
We have also checked the .map file, but I can't understand the below names
Will be appreciated your help. Thanks
The text was updated successfully, but these errors were encountered: