Page 1 of 1

Do not include WiFi in project

Posted: Thu Apr 11, 2024 10:12 pm
by -S5NC-
I am having a lot of trouble removing WiFi from my project. I loaded the simple blink sketch, but it keeps including WiFi components, increasing compile time and I assume also the app size, with things such as wpa_supplicant.

There is no off switch in menuconfig nor the "SDK Configuration Editor" in Visual Studio Code's ESP-IDF extension, unlike Bluetooth for which it is extremely obvious and easy.

I tried setting all instances of 'CONFIG_SOC_WIFI_SUPPORTED=y' to 'CONFIG_SOC_WIFI_SUPPORTED=n' and 'CONFIG_ESP_WIFI_ENABLED=y' to 'CONFIG_ESP_WIFI_ENABLED=n' in the file "/sdkconfig" in the root directory of the example project, and tried setting the bools in "/build/config/sdkconfig.json" to false, but the values in both files are always replaced to the enabled state, I don't know why.

I cannot find any resource on not including WiFi in the binary, only posts saying to include WiFi and then disable it with

Code: Select all

esp_err_t results = esp_wifi_stop();
: https://esp32.com/viewtopic.php?t=25515
and unanswered questions from 6 years ago: https://esp32.com/viewtopic.php?t=5211

Please could somebody advise?

Re: Do not include WiFi in project

Posted: Fri Apr 12, 2024 12:06 pm
by MicroController
A lot of IDF code/components are built/compiled automatically in every IDF project build. While this indeed increases the build time, unused code may be compiled but is usually not linked into the final binary.

Re: Do not include WiFi in project

Posted: Fri Apr 12, 2024 12:15 pm
by RalphD
please as well don't forget that there are hardware components other then the plain processor involved which require a defined status like the radio PHY on the ESP.
If your project does not require any of these features you should consider to use another processor family.