From 10601b04eabb5619e51bdd5f04c7d77ea8e201eb Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 23 Jul 2024 11:41:25 +1000 Subject: [PATCH] esp32/boards: Build using newlib nano formatting functions. Saves code size, MicroPython doesn't appear to rely on any of the missing formatters (64-bit integers, c99-style named arguments). Signed-off-by: Angus Gratton --- ports/esp32/boards/sdkconfig.base | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ports/esp32/boards/sdkconfig.base b/ports/esp32/boards/sdkconfig.base index ca36206d1..84a423fa0 100644 --- a/ports/esp32/boards/sdkconfig.base +++ b/ports/esp32/boards/sdkconfig.base @@ -121,3 +121,9 @@ CONFIG_ETH_USE_SPI_ETHERNET=y CONFIG_ETH_SPI_ETHERNET_W5500=y CONFIG_ETH_SPI_ETHERNET_KSZ8851SNL=y CONFIG_ETH_SPI_ETHERNET_DM9051=y + +# Using newlib "nano" formatting saves size on SoCs where "nano" formatting +# functions are in ROM. Note some newer chips (c2,c6) have "full" newlib +# formatting in ROM instead and should override this, check +# ESP_ROM_HAS_NEWLIB_NANO_FORMAT. +CONFIG_NEWLIB_NANO_FORMAT=y