diff options
author | Damien George <damien@micropython.org> | 2021-02-18 11:51:01 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-02-19 10:42:16 +1100 |
commit | 466ad35a725742928ef7b12522cc75929083af35 (patch) | |
tree | 96473b52581fcb328e0b4ddfc0a483f3f97e6552 | |
parent | d4b45898f58aae66c706ca5f832f11727daef46b (diff) |
esp32/boards: Enable size optimisation for builds.
This enables -Os for compilation, but still keeps full assertion messages.
With IDF v4.2, -Os changes the GENERIC firmware size from 1512176 down to
1384640, and the GENERIC_SPIRAM firmware is now 1452320 which fits in the
allocated partition.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r-- | ports/esp32/boards/sdkconfig.base | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ports/esp32/boards/sdkconfig.base b/ports/esp32/boards/sdkconfig.base index c84dd606b..91e68c7bf 100644 --- a/ports/esp32/boards/sdkconfig.base +++ b/ports/esp32/boards/sdkconfig.base @@ -4,6 +4,12 @@ CONFIG_IDF_TARGET="esp32" CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000 +# Compiler options: use -Os to reduce size, but keep full assertions +# (CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is for IDF 4.0.2) +CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y +CONFIG_COMPILER_OPTIMIZATION_SIZE=y +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y + # Application manager CONFIG_APP_EXCLUDE_PROJECT_VER_VAR=y CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR=y |