mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
esp32/boards: Reduce flash usage of ESP32-C6 boards.
Reduces ESP32_GENERIC_C6 application flash size from 2024432 to 1813216 (206KB smaller). Also has benefit of reducing D/IRAM size, increasing free memory at runtime (167187 to 148584, -18603 bytes). Most of this savings comes from building with -Os instead of -O2, but about 10KB comes from using the SPI flash functions from the ROM. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
committed by
Damien George
parent
f0d445a466
commit
5b98126c21
@@ -2,6 +2,7 @@ set(IDF_TARGET esp32c6)
|
||||
|
||||
set(SDKCONFIG_DEFAULTS
|
||||
boards/sdkconfig.base
|
||||
boards/sdkconfig.riscv
|
||||
boards/sdkconfig.c6
|
||||
boards/sdkconfig.ble
|
||||
)
|
||||
|
||||
@@ -2,6 +2,7 @@ set(IDF_TARGET esp32c6)
|
||||
|
||||
set(SDKCONFIG_DEFAULTS
|
||||
boards/sdkconfig.base
|
||||
boards/sdkconfig.riscv
|
||||
boards/sdkconfig.c6
|
||||
boards/sdkconfig.ble
|
||||
)
|
||||
|
||||
@@ -2,6 +2,7 @@ set(IDF_TARGET esp32c6)
|
||||
|
||||
set(SDKCONFIG_DEFAULTS
|
||||
boards/sdkconfig.base
|
||||
boards/sdkconfig.riscv
|
||||
boards/sdkconfig.c6
|
||||
boards/sdkconfig.ble
|
||||
boards/UM_TINYC6/sdkconfig.board
|
||||
|
||||
@@ -1,2 +1,10 @@
|
||||
# Workaround for https://github.com/espressif/esp-idf/issues/14456
|
||||
CONFIG_ESP_SYSTEM_HW_STACK_GUARD=n
|
||||
|
||||
# 802.15.4 not currently supported in MicroPython, disabling saves
|
||||
# a little compile time (no difference in binary)
|
||||
CONFIG_IEEE802154_ENABLED=n
|
||||
|
||||
# Using the SPI flash implementation in ROM saves about 10KB of binary size
|
||||
# (and some static RAM)
|
||||
CONFIG_SPI_FLASH_ROM_IMPL=y
|
||||
|
||||
3
ports/esp32/boards/sdkconfig.riscv
Normal file
3
ports/esp32/boards/sdkconfig.riscv
Normal file
@@ -0,0 +1,3 @@
|
||||
# ESP RISC-V binary sizes are generally larger than Xtensa ones,
|
||||
# so switch to size optimization by default
|
||||
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
|
||||
Reference in New Issue
Block a user