@@ -86,6 +86,14 @@ INC += \
86
86
-isystem esp-idf \
87
87
-isystem esp-idf/components/app_update/include \
88
88
-isystem esp-idf/components/bootloader_support/include \
89
+ -isystem esp-idf/components/bt/host/nimble/esp-hci/include \
90
+ -isystem esp-idf/components/bt/host/nimble/nimble/nimble/host/include \
91
+ -isystem esp-idf/components/bt/host/nimble/nimble/nimble/host/services/gap/include \
92
+ -isystem esp-idf/components/bt/host/nimble/nimble/nimble/include \
93
+ -isystem esp-idf/components/bt/host/nimble/nimble/nimble/host/util/include \
94
+ -isystem esp-idf/components/bt/host/nimble/nimble/porting/nimble/include \
95
+ -isystem esp-idf/components/bt/host/nimble/nimble/porting/npl/freertos/include \
96
+ -isystem esp-idf/components/bt/host/nimble/port/include \
89
97
-isystem esp-idf/components/driver/include \
90
98
-isystem esp-idf/components/driver/$(IDF_TARGET ) /include \
91
99
-isystem esp-idf/components/$(IDF_TARGET ) /include \
@@ -133,6 +141,7 @@ endif
133
141
134
142
CFLAGS += \
135
143
-DHAVE_CONFIG_H \
144
+ -DESP_PLATFORM=1 \
136
145
-DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" \
137
146
-DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX
138
147
@@ -298,8 +307,10 @@ else
298
307
DEBUG_SDKCONFIG = esp-idf-config/sdkconfig-opt.defaults
299
308
endif
300
309
301
- SDKCONFIGS = esp-idf-config/sdkconfig.defaults;$(DEBUG_SDKCONFIG ) ;$(FLASH_SDKCONFIG ) ;$(TARGET_SDKCONFIG ) ;boards/$(BOARD ) /sdkconfig
302
-
310
+ SDKCONFIGS := esp-idf-config/sdkconfig.defaults;$(DEBUG_SDKCONFIG ) ;$(FLASH_SDKCONFIG ) ;$(TARGET_SDKCONFIG ) ;boards/$(BOARD ) /sdkconfig
311
+ ifneq ($(CIRCUITPY_BLEIO ) ,0)
312
+ SDKCONFIGS := esp-idf-config/sdkconfig-ble.defaults;$(SDKCONFIGS)
313
+ endif
303
314
# create the config headers
304
315
$(BUILD ) /esp-idf/config/sdkconfig.h : boards/$(BOARD ) /sdkconfig | $(BUILD ) /esp-idf
305
316
IDF_PATH=$(IDF_PATH ) cmake -S . -B $(BUILD ) /esp-idf -DSDKCONFIG=$(BUILD ) /esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS=" $( SDKCONFIGS) " -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH ) /tools/cmake/toolchain-$(IDF_TARGET ) .cmake -DIDF_TARGET=$(IDF_TARGET ) -GNinja
@@ -332,6 +343,12 @@ BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a l
332
343
BINARY_BLOBS = esp-idf/components/esp_phy/lib/$(IDF_TARGET ) /libphy.a $(addprefix esp-idf/components/esp_wifi/lib/$(IDF_TARGET ) /, $(BINARY_WIFI_BLOBS ) )
333
344
334
345
ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH ) app_update bootloader_support driver efuse esp_adc_cal esp_common esp_event esp_hw_support esp_ipc esp_netif esp_pm esp_phy esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant
346
+ ifneq ($(CIRCUITPY_BLEIO ) ,0)
347
+ ESP_IDF_COMPONENTS_LINK += bt
348
+ BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libbtbb.a \
349
+ esp-idf/components/bt/controller/lib_esp32c3_family/$(IDF_TARGET)/libbtdm_app.a
350
+ endif
351
+
335
352
ESP_IDF_COMPONENTS_EXPANDED = $(foreach component, $(ESP_IDF_COMPONENTS_LINK ) , $(BUILD ) /esp-idf/esp-idf/$(component ) /lib$(component ) .a)
336
353
337
354
MBEDTLS_COMPONENTS_LINK = crypto tls x509
@@ -372,6 +389,7 @@ esp-idf-stamp: $(BUILD)/esp-idf/config/sdkconfig.h
372
389
esp-idf/esp_system/__ldgen_output_sections.ld \
373
390
esp-idf/app_update/libapp_update.a \
374
391
esp-idf/bootloader_support/libbootloader_support.a \
392
+ esp-idf/bt/libbt.a \
375
393
esp-idf/driver/libdriver.a \
376
394
esp-idf/efuse/libefuse.a \
377
395
esp-idf/esp_adc_cal/libesp_adc_cal.a \
0 commit comments