Is there a way to disable certain components of the IDF?
I understand that unused components are not included in the image (app), but my problem is that every time I need to a compilation (of even one single file), idf is checking ALL components for changes and it really takes a while, it's frustrating. There are quite a few components I will never use, so I'd like to at least disable them.
Disable components from IDF
-
- Posts: 6
- Joined: Tue Aug 15, 2023 10:49 am
Re: Disable components from IDF
Hi, In your project level CMakeLists.txt file, you may set COMPONENTS like before the call to to restrict the number of components that are built.
Code: Select all
set(COMPONENTS main)
Code: Select all
project()
Re: Disable components from IDF
Yeah, works, thanks!
A few notes:
- many components remain active nonetheless because other components depend on them (which was to be expected)
- a few components (in my case: bt, esp_psram, wear_levelling) must be included explicitly otherwise the functionality will lack
- most components (all minus above and minus "main") can be left out anyway
- this will mess with your sdkconfig file. Make sure you make a backup first or be prepared to all configuring from scratch
- compare original and adjusted sdkconfig to see what components are missing (their config will be removed), if some are actually required, you can add them manually
- look in esp-idf/components for components' names. Don't be fooled by the output of idf (using __some_name) that's not what this option expects.
A few notes:
- many components remain active nonetheless because other components depend on them (which was to be expected)
- a few components (in my case: bt, esp_psram, wear_levelling) must be included explicitly otherwise the functionality will lack
- most components (all minus above and minus "main") can be left out anyway
- this will mess with your sdkconfig file. Make sure you make a backup first or be prepared to all configuring from scratch
- compare original and adjusted sdkconfig to see what components are missing (their config will be removed), if some are actually required, you can add them manually
- look in esp-idf/components for components' names. Don't be fooled by the output of idf (using __some_name) that's not what this option expects.
Who is online
Users browsing this forum: Baidu [Spider] and 152 guests