Skip to content

Commit 2876ac1

Browse files
nathanjelCurclamas
authored andcommitted
Feature/selective compilation (espressif#1671)
* Selective compilation * Optimized component.mk * Autoconnect WiFi now forces WiFi
1 parent 25e28b3 commit 2876ac1

File tree

2 files changed

+142
-1
lines changed

2 files changed

+142
-1
lines changed

Diff for: Kconfig.projbuild

+139
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,147 @@ config AUTOCONNECT_WIFI
106106
bool "Autoconnect WiFi on boot"
107107
default "n"
108108
depends on AUTOSTART_ARDUINO
109+
select ARDUINO_SELECTIVE_WiFi
109110
help
110111
If enabled, WiFi will connect to the last used SSID (if station was enabled),
111112
else connection will be started only after calling WiFi.begin(ssid, password)
112113

114+
config ARDUINO_SELECTIVE_COMPILATION
115+
bool "Include only specific Arduino libraries"
116+
default n
117+
118+
config ARDUINO_SELECTIVE_ArduinoOTA
119+
bool "Enable ArduinoOTA"
120+
depends on ARDUINO_SELECTIVE_COMPILATION
121+
select ARDUINO_SELECTIVE_WiFi
122+
select ARDUINO_SELECTIVE_ESPmDNS
123+
default y
124+
125+
config ARDUINO_SELECTIVE_AsyncUDP
126+
bool "Enable AsyncUDP"
127+
depends on ARDUINO_SELECTIVE_COMPILATION
128+
default y
129+
130+
config ARDUINO_SELECTIVE_AzureIoT
131+
bool "Enable AzureIoT"
132+
depends on ARDUINO_SELECTIVE_COMPILATION
133+
select ARDUINO_SELECTIVE_HTTPClient
134+
default y
135+
136+
config ARDUINO_SELECTIVE_BLE
137+
bool "Enable BLE"
138+
depends on ARDUINO_SELECTIVE_COMPILATION
139+
default y
140+
141+
config ARDUINO_SELECTIVE_BluetoothSerial
142+
bool "Enable BluetoothSerial"
143+
depends on ARDUINO_SELECTIVE_COMPILATION
144+
default y
145+
146+
config ARDUINO_SELECTIVE_DNSServer
147+
bool "Enable DNSServer"
148+
depends on ARDUINO_SELECTIVE_COMPILATION
149+
select ARDUINO_SELECTIVE_WiFi
150+
default y
151+
152+
config ARDUINO_SELECTIVE_EEPROM
153+
bool "Enable EEPROM"
154+
depends on ARDUINO_SELECTIVE_COMPILATION
155+
default y
156+
157+
config ARDUINO_SELECTIVE_ESP32
158+
bool "Enable ESP32"
159+
depends on ARDUINO_SELECTIVE_COMPILATION
160+
default y
161+
162+
config ARDUINO_SELECTIVE_ESPmDNS
163+
bool "Enable ESPmDNS"
164+
depends on ARDUINO_SELECTIVE_COMPILATION
165+
select ARDUINO_SELECTIVE_WiFi
166+
default y
167+
168+
config ARDUINO_SELECTIVE_FS
169+
bool "Enable FS"
170+
depends on ARDUINO_SELECTIVE_COMPILATION
171+
default y
172+
173+
config ARDUINO_SELECTIVE_HTTPClient
174+
bool "Enable HTTPClient"
175+
depends on ARDUINO_SELECTIVE_COMPILATION
176+
select ARDUINO_SELECTIVE_WiFi
177+
select ARDUINO_SELECTIVE_WiFiClientSecure
178+
default y
179+
180+
config ARDUINO_SELECTIVE_NetBIOS
181+
bool "Enable NetBIOS"
182+
depends on ARDUINO_SELECTIVE_COMPILATION
183+
select ARDUINO_SELECTIVE_WiFi
184+
default y
185+
186+
config ARDUINO_SELECTIVE_Preferences
187+
bool "Enable Preferences"
188+
depends on ARDUINO_SELECTIVE_COMPILATION
189+
default y
190+
191+
config ARDUINO_SELECTIVE_SD
192+
bool "Enable SD"
193+
depends on ARDUINO_SELECTIVE_COMPILATION
194+
select ARDUINO_SELECTIVE_FS
195+
default y
196+
197+
config ARDUINO_SELECTIVE_SD_MMC
198+
bool "Enable SD_MMC"
199+
depends on ARDUINO_SELECTIVE_COMPILATION
200+
select ARDUINO_SELECTIVE_FS
201+
default y
202+
203+
config ARDUINO_SELECTIVE_SimpleBLE
204+
bool "Enable SimpleBLE"
205+
depends on ARDUINO_SELECTIVE_COMPILATION
206+
default y
207+
208+
config ARDUINO_SELECTIVE_SPI
209+
bool "Enable SPI"
210+
depends on ARDUINO_SELECTIVE_COMPILATION
211+
default y
212+
213+
config ARDUINO_SELECTIVE_SPIFFS
214+
bool "Enable SPIFFS"
215+
depends on ARDUINO_SELECTIVE_COMPILATION
216+
select ARDUINO_SELECTIVE_FS
217+
default y
218+
219+
config ARDUINO_SELECTIVE_Ticker
220+
bool "Enable Ticker"
221+
depends on ARDUINO_SELECTIVE_COMPILATION
222+
default y
223+
224+
config ARDUINO_SELECTIVE_Update
225+
bool "Enable Update"
226+
depends on ARDUINO_SELECTIVE_COMPILATION
227+
default y
228+
229+
config ARDUINO_SELECTIVE_WebServer
230+
bool "Enable WebServer"
231+
depends on ARDUINO_SELECTIVE_COMPILATION
232+
default y
233+
select ARDUINO_SELECTIVE_FS
234+
235+
config ARDUINO_SELECTIVE_WiFi
236+
bool "Enable WiFi"
237+
depends on ARDUINO_SELECTIVE_COMPILATION
238+
default y
239+
240+
config ARDUINO_SELECTIVE_WiFiClientSecure
241+
bool "Enable WiFiClientSecure"
242+
depends on ARDUINO_SELECTIVE_COMPILATION
243+
select ARDUINO_SELECTIVE_WiFi
244+
default y
245+
246+
config ARDUINO_SELECTIVE_Wire
247+
bool "Enable Wire"
248+
depends on ARDUINO_SELECTIVE_COMPILATION
249+
default y
250+
251+
113252
endmenu

Diff for: component.mk

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
ARDUINO_CORE_LIBS := $(patsubst $(COMPONENT_PATH)/%,%,$(sort $(dir $(wildcard $(COMPONENT_PATH)/libraries/*/*/)) $(dir $(wildcard $(COMPONENT_PATH)/libraries/*/*/*/))))
1+
ARDUINO_LIBRARIES_LIST := $(patsubst $(COMPONENT_PATH)/libraries/%,%,$(wildcard $(COMPONENT_PATH)/libraries/*))
2+
ARDUINO_SINGLE_LIBRARY_FILES = $(patsubst $(COMPONENT_PATH)/%,%,$(sort $(dir $(wildcard $(COMPONENT_PATH)/libraries/$(MODULE)/*/)) $(dir $(wildcard $(COMPONENT_PATH)/libraries/$(MODULE)/*/*/)) $(dir $(wildcard $(COMPONENT_PATH)/libraries/$(MODULE)/*/*/*/)) $(dir $(wildcard $(COMPONENT_PATH)/libraries/$(MODULE)/*/*/*/*/)) $(dir $(wildcard $(COMPONENT_PATH)/libraries/$(MODULE)/*/*/*/*/*/))))
3+
ARDUINO_CORE_LIBS := $(foreach MODULE,$(ARDUINO_LIBRARIES_LIST),$(if $(CONFIG_ARDUINO_SELECTIVE_$(MODULE)),$(ARDUINO_SINGLE_LIBRARY_FILES)))
24

35
COMPONENT_ADD_INCLUDEDIRS := cores/esp32 variants/esp32 $(ARDUINO_CORE_LIBS)
46
COMPONENT_PRIV_INCLUDEDIRS := cores/esp32/libb64

0 commit comments

Comments
 (0)