Do not include WiFi in project

-S5NC-
Posts: 1
Joined: Thu Apr 11, 2024 9:59 pm

Do not include WiFi in project

Postby -S5NC- » Thu Apr 11, 2024 10:12 pm

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?

MicroController
Posts: 1725
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Do not include WiFi in project

Postby MicroController » Fri Apr 12, 2024 12:06 pm

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.

RalphD
Posts: 103
Joined: Thu Nov 25, 2021 9:02 pm

Re: Do not include WiFi in project

Postby RalphD » Fri Apr 12, 2024 12:15 pm

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.

Who is online

Users browsing this forum: Majestic-12 [Bot] and 252 guests