diff --git a/sdkconfig.defaults b/sdkconfig.defaults index 4e020d8..5f6ba8e 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults @@ -10,6 +10,14 @@ CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" CONFIG_LOG_DEFAULT_LEVEL_INFO=y CONFIG_COMPILER_OPTIMIZATION_PERF=y +# --- Bootloader size: keep the 2nd-stage bootloader inside iram_seg ---------- +# Without these the bootloader links at -O2 (PERF) and pulls in the full +# libc printf machinery (svfiprintf ~9 KB) which overflows the 12 KB iram_seg. +# SIZE (-Os) reduces code but alone is not sufficient; dropping the log level +# from INFO to WARN removes the format-string I/O paths that pull libc stdio. +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y +CONFIG_BOOTLOADER_LOG_LEVEL_WARN=y + # --- FreeRTOS ---------------------------------------------------------------- # 1 kHz tick gives smoother LVGL animations (bubble breathing, transitions). CONFIG_FREERTOS_HZ=1000