@@ -135,7 +135,7 @@ ifeq ($(DEBUG), 1)
135135 # You may want to enable these flags to make setting breakpoints easier.
136136 # CFLAGS += -fno-inline -fno-ipa-sra
137137else
138- CFLAGS += -DNDEBUG -ggdb3
138+ CFLAGS += -DNDEBUG
139139 # RISC-V is larger than xtensa
140140 # Use -Os for RISC-V when it overflows
141141 ifeq ($(IDF_TARGET_ARCH),riscv)
@@ -150,6 +150,11 @@ CFLAGS += $(OPTIMIZATION_FLAGS)
150150
151151CFLAGS += $(INC ) -Werror -Wall -std=gnu11 -Wl,--gc-sections $(BASE_CFLAGS ) $(C_DEFS ) $(CFLAGS_MOD ) $(COPT ) -Werror=missing-prototypes
152152
153+ # Most current ESPs have nano versions of newlib in ROM so we use them.
154+ ifneq ($(IDF_TARGET ) ,esp32c6)
155+ CFLAGS += --specs=nano.specs
156+ endif
157+
153158ifeq ($(IDF_TARGET_ARCH ) ,xtensa)
154159CFLAGS += -mlongcalls
155160else ifeq ($(IDF_TARGET_ARCH),riscv)
@@ -412,8 +417,12 @@ endif
412417ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH ) app_update bootloader_support driver efuse esp_adc esp_app_format esp_common esp_event esp_hw_support esp_netif esp_partition esp_phy esp_pm esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls mdns newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant
413418ifneq ($(CIRCUITPY_BLEIO ) ,0)
414419 ESP_IDF_COMPONENTS_LINK += bt
420+ ifeq ($(IDF_TARGET),esp32)
421+ BINARY_BLOBS += esp-idf/components/bt/controller/lib_esp32/$(IDF_TARGET)/libbtdm_app.a
422+ else
415423 BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libbtbb.a \
416- esp-idf/components/bt/controller/lib_esp32c3_family/$(IDF_TARGET)/libbtdm_app.a
424+ esp-idf/components/bt/controller/lib_esp32c3_family/$(IDF_TARGET)/libbtdm_app.a
425+ endif
417426endif
418427ifneq ($(CIRCUITPY_ESPULP ) ,0)
419428 ESP_IDF_COMPONENTS_LINK += ulp
0 commit comments