hello,I have some problems when I work with esp-idf V5.2.1.
Some functions before the compilation of the project are confirmed to be not turned on in menuconfig, but after the project is compiled, the corresponding .a file is generated in the build/esp-idf folder, and the corresponding functions are indeed turned on in the sdkconfig file, even after optimizing the compilation level and turning off some log output, the files generated by these useless components occupy a lot of flash space, resulting in a slow online upgrade, how can I completely close these unused components?
Is it possible for each component to have a clear option to enable/disable the component completely?
How Do I Disable the ESP-IDF Component That Is Not Used in a Project?
-
- Posts: 12
- Joined: Mon Mar 04, 2024 9:06 am
How Do I Disable the ESP-IDF Component That Is Not Used in a Project?
- Attachments
-
- screenshot-20240704-095301.png (97.22 KiB) Viewed 2335 times
-
- Posts: 1735
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: How Do I Disable the ESP-IDF Component That Is Not Used in a Project?
I suggest to check if this is actually the case by running idf.py size-components.yaochuanfu wrote: ↑Thu Jul 04, 2024 2:49 amthe files generated by these useless components occupy a lot of flash space
Re: How Do I Disable the ESP-IDF Component That Is Not Used in a Project?
This can be accomplished via cmake. Have a look at the COMPONENTS bullets here: https://docs.espressif.com/projects/esp ... -variables
Re: How Do I Disable the ESP-IDF Component That Is Not Used in a Project?
Have you changed you baud rate to flash it faster ?resulting in a slow online upgrade
-
- Posts: 12
- Joined: Mon Mar 04, 2024 9:06 am
Re: How Do I Disable the ESP-IDF Component That Is Not Used in a Project?
MicroController wrote: ↑Thu Jul 04, 2024 8:28 amI suggest to check if this is actually the case by running idf.py size-components.yaochuanfu wrote: ↑Thu Jul 04, 2024 2:49 amthe files generated by these useless components occupy a lot of flash space
Thanks for your response.
You're right, but there are still a few in the stats, and I'm not sure if the project really needs those components.
- Attachments
-
- 20240705-092420.jpg (376.88 KiB) Viewed 2210 times
Last edited by yaochuanfu on Fri Jul 05, 2024 1:35 am, edited 1 time in total.
-
- Posts: 12
- Joined: Mon Mar 04, 2024 9:06 am
Re: How Do I Disable the ESP-IDF Component That Is Not Used in a Project?
Thanks,I will try to check it out.a2800276 wrote: ↑Thu Jul 04, 2024 8:37 amThis can be accomplished via cmake. Have a look at the COMPONENTS bullets here: https://docs.espressif.com/projects/esp ... -variables
-
- Posts: 1735
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: How Do I Disable the ESP-IDF Component That Is Not Used in a Project?
I don't know either. Those libbt* entries would be Bluetooth code. If you use Bluetooth, you probably need them.yaochuanfu wrote: ↑Fri Jul 05, 2024 1:25 amthere are still a few in the stats, and I'm not sure if the project really needs those components.
And I wouldn't worry about any components that occupy only a few (kilo)bytes of flash or so at all.
FWIW, the linker does a decent job in removing all entities (functions, variables, constants) from the final binary which are not actually used/referenced by the final application, so the presence or size of a library (.a) is not necessarily indicative of the lib's contribution to flash use/binary size.
Who is online
Users browsing this forum: No registered users and 115 guests