Removing IDF components? [Solved]

cnlohr
Posts: 65
Joined: Sat Dec 03, 2016 5:39 am

Removing IDF components? [Solved]

Postby cnlohr » Tue Feb 26, 2019 8:51 am

Is it possible to remove IDF components? Specifically I was hoping to remove lwip so I could use mine. The application I'm running into needs significantly higher performance than the LWIP stack for the '32 can provide. The 8266 stack was just fast enough for this application, but it shouldn't take long to just use my TCP/IP stack.

Just some mechanism to blacklist or remove components...

It would also be helpful so I don't have to wait as long between recompiles for large components like SSL and HTTP.
Last edited by cnlohr on Tue Feb 26, 2019 9:43 am, edited 1 time in total.

cnlohr
Posts: 65
Joined: Sat Dec 03, 2016 5:39 am

Re: Removing IDF components?

Postby cnlohr » Tue Feb 26, 2019 9:43 am

Solved: create a components folder in your project, in there, make subfolders for each component you want to nullify. Place an empty component.mk file in each to make it void.

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Removing IDF components?

Postby Ritesh » Tue Feb 26, 2019 6:58 pm

cnlohr wrote:
Tue Feb 26, 2019 9:43 am
Solved: create a components folder in your project, in there, make subfolders for each component you want to nullify. Place an empty component.mk file in each to make it void.
Yes. Correct. You can create your own component into your project application directory and also can override components present into IDF directory.
Regards,
Ritesh Prajapati

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Removing IDF components? [Solved]

Postby ESP_Angus » Wed Feb 27, 2019 5:46 am

As well as overriding by placing empty component(s) in the project, you can set the COMPONENTS variable in your project Makefile to build only a subset of available components:
https://docs.espressif.com/projects/esp ... -variables

Setting this variable is also possible in the new CMake-based build system:
https://docs.espressif.com/projects/esp ... -variables

The functionality is a little easier in the CMake-based build system because components also track their dependencies, so you can specify a very minimal list of COMPONENTS (ie "lwip main", for example) and have the build system expand necessary dependent components. Whereas in GNU Make you have to list them all in the Makefile.

cnlohr
Posts: 65
Joined: Sat Dec 03, 2016 5:39 am

Re: Removing IDF components? [Solved]

Postby cnlohr » Thu Feb 28, 2019 8:46 am

Thanks! I will probably give option B a try at some point.

cnlohr
Posts: 65
Joined: Sat Dec 03, 2016 5:39 am

Re: Removing IDF components? [Solved]

Postby cnlohr » Sun Mar 03, 2019 4:09 am

Just FYI I cast my vote to keep the existing Makefile system. This CMake thing feels like it will make it a lot harder to troubleshoot problems and be a much higher barrier for entry on anything except the most basic cases...

Also, FYI for anyone else wanting to do network hacking... this is what I used in my Makefile:

Code: Select all

COMPONENTS := bootloader bt-support driver esp32 esp_adc_cal \
	espcoredump esp_event esp_ringbuf esptool_py heap \
	idf_test freertos jsmn json log micro-ecc newlib nvs_flash \
	pthread soc spiffs spi_flash ulp unity wpa_supplicant \
	app_trace xtensa-debug-module ethernet bootloader_support \
	vfs app_update mbedtls partition_table

COMPONENTS+=cnip cnhttp main

sdawans
Posts: 1
Joined: Fri Jan 08, 2021 12:34 pm

Re: Removing IDF components?

Postby sdawans » Fri Jan 08, 2021 12:36 pm

cnlohr wrote:
Tue Feb 26, 2019 9:43 am
Solved: create a components folder in your project, in there, make subfolders for each component you want to nullify. Place an empty component.mk file in each to make it void.
For this to work with CMake, I also needed to add an empty CMakeLists.txt file in the new component folder. Otherwise the build system keeps finding the component in esp-idf.

cnlohr
Posts: 65
Joined: Sat Dec 03, 2016 5:39 am

Re: Removing IDF components? [Solved]

Postby cnlohr » Fri Apr 02, 2021 7:50 am

For anyone who stumbles upon this at a later time, I believe this is how you do it.

https://github.com/cnlohr/esp32-c3-cnte ... txt#L4-L11

Who is online

Users browsing this forum: Baidu [Spider] and 148 guests