Switch to newlib nano

This commit is contained in:
Scott Shawcroft 2023-09-12 12:18:21 -07:00
parent 18fd0045f6
commit 99726e255d
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
9 changed files with 61 additions and 6 deletions

View File

@ -135,7 +135,7 @@ ifeq ($(DEBUG), 1)
# You may want to enable these flags to make setting breakpoints easier. # You may want to enable these flags to make setting breakpoints easier.
# CFLAGS += -fno-inline -fno-ipa-sra # CFLAGS += -fno-inline -fno-ipa-sra
else else
CFLAGS += -DNDEBUG -ggdb3 CFLAGS += -DNDEBUG
# RISC-V is larger than xtensa # RISC-V is larger than xtensa
# Use -Os for RISC-V when it overflows # Use -Os for RISC-V when it overflows
ifeq ($(IDF_TARGET_ARCH),riscv) ifeq ($(IDF_TARGET_ARCH),riscv)
@ -150,6 +150,11 @@ CFLAGS += $(OPTIMIZATION_FLAGS)
CFLAGS += $(INC) -Werror -Wall -std=gnu11 -Wl,--gc-sections $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT) -Werror=missing-prototypes CFLAGS += $(INC) -Werror -Wall -std=gnu11 -Wl,--gc-sections $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT) -Werror=missing-prototypes
# Most current ESPs have nano versions of newlib in ROM so we use them.
ifneq ($(IDF_TARGET),esp32c6)
CFLAGS += --specs=nano.specs
endif
ifeq ($(IDF_TARGET_ARCH),xtensa) ifeq ($(IDF_TARGET_ARCH),xtensa)
CFLAGS += -mlongcalls CFLAGS += -mlongcalls
else ifeq ($(IDF_TARGET_ARCH),riscv) else ifeq ($(IDF_TARGET_ARCH),riscv)
@ -412,8 +417,12 @@ endif
ESP_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 ESP_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
ifneq ($(CIRCUITPY_BLEIO),0) ifneq ($(CIRCUITPY_BLEIO),0)
ESP_IDF_COMPONENTS_LINK += bt ESP_IDF_COMPONENTS_LINK += bt
ifeq ($(IDF_TARGET),esp32)
BINARY_BLOBS += esp-idf/components/bt/controller/lib_esp32/$(IDF_TARGET)/libbtdm_app.a
else
BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libbtbb.a \ BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libbtbb.a \
esp-idf/components/bt/controller/lib_esp32c3_family/$(IDF_TARGET)/libbtdm_app.a esp-idf/components/bt/controller/lib_esp32c3_family/$(IDF_TARGET)/libbtdm_app.a
endif
endif endif
ifneq ($(CIRCUITPY_ESPULP),0) ifneq ($(CIRCUITPY_ESPULP),0)
ESP_IDF_COMPONENTS_LINK += ulp ESP_IDF_COMPONENTS_LINK += ulp

View File

@ -10,6 +10,13 @@
CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3"
# end of LWIP # end of LWIP
#
# Camera configuration
#
# CONFIG_OV7725_SUPPORT is not set
# CONFIG_OV3660_SUPPORT is not set
# end of Camera configuration
# end of Component config # end of Component config
# end of Espressif IoT Development Framework Configuration # end of Espressif IoT Development Framework Configuration

View File

@ -56,6 +56,12 @@ CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16
# CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set # CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set
# end of Wi-Fi # end of Wi-Fi
#
# Newlib
#
CONFIG_NEWLIB_NANO_FORMAT=y
# end of Newlib
# #
# SPI Flash driver # SPI Flash driver
# #

View File

@ -49,6 +49,12 @@ CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y
# end of Driver Configurations # end of Driver Configurations
#
# Newlib
#
CONFIG_NEWLIB_NANO_FORMAT=y
# end of Newlib
# end of Component config # end of Component config
# end of Espressif IoT Development Framework Configuration # end of Espressif IoT Development Framework Configuration

View File

@ -46,6 +46,12 @@ CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM=y
# end of ESP System Settings # end of ESP System Settings
#
# Newlib
#
CONFIG_NEWLIB_NANO_FORMAT=y
# end of Newlib
# #
# Ultra Low Power (ULP) Co-processor # Ultra Low Power (ULP) Co-processor
# #

View File

@ -85,6 +85,12 @@ CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16
# CONFIG_ESP32_WIFI_NVS_ENABLED is not set # CONFIG_ESP32_WIFI_NVS_ENABLED is not set
# end of Wi-Fi # end of Wi-Fi
#
# Newlib
#
CONFIG_NEWLIB_NANO_FORMAT=y
# end of Newlib
# #
# Ultra Low Power (ULP) Co-processor # Ultra Low Power (ULP) Co-processor
# #

View File

@ -1,4 +1,7 @@
# #
# Espressif IoT Development Framework Configuration
#
#
# Serial flasher config # Serial flasher config
# #
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
@ -6,13 +9,17 @@
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE="4MB" CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
# end of Serial flasher config # end of Serial flasher config
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB-no-uf2.csv"
# #
# Partition Table # Partition Table
# #
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB-no-uf2.csv"
CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-4MB-no-uf2.csv" CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-4MB-no-uf2.csv"
# end of Partition Table # end of Partition Table
# end of Espressif IoT Development Framework Configuration

View File

@ -1,4 +1,7 @@
# #
# Espressif IoT Development Framework Configuration
#
#
# Serial flasher config # Serial flasher config
# #
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
@ -6,13 +9,17 @@
# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE="8MB" CONFIG_ESPTOOLPY_FLASHSIZE="8MB"
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
# end of Serial flasher config # end of Serial flasher config
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-8MB-no-uf2.csv"
# #
# Partition Table # Partition Table
# #
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-8MB-no-uf2.csv"
CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-8MB-no-uf2.csv" CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-8MB-no-uf2.csv"
# end of Partition Table # end of Partition Table
# end of Espressif IoT Development Framework Configuration

View File

@ -49,6 +49,7 @@ CIRCUITPY_WIFI ?= 1
ifeq ($(IDF_TARGET),esp32) ifeq ($(IDF_TARGET),esp32)
# Modules # Modules
CIRCUITPY_RGBMATRIX = 0 CIRCUITPY_RGBMATRIX = 0
CIRCUITPY_BLEIO = 0
# Features # Features
CIRCUITPY_USB = 0 CIRCUITPY_USB = 0