summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Smith <stephane.smith@titansensor.com>2022-04-12 19:44:45 +0000
committerDamien George <damien@micropython.org>2022-04-14 16:06:41 +1000
commitae3d5289a5fa893ed9fd9c6d824043d7644179d7 (patch)
treeccaa39f2a0c2901c78f10a5c93f5583c2a84a63e
parentfe9eaf12f391232f195ac052005ac2b852409dd6 (diff)
esp32/boards: Compile GENERIC_SPIRAM and UM_TINYPICO with -Os.
These boards do not build with IDF v4.4 because the section .iram0.text does not fit in region iram0_0_seg. Enabling SPIRAM increases the code size so use -Os instead of -O2 to build these boards. Fixes issue #8260.
-rw-r--r--ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake1
-rw-r--r--ports/esp32/boards/GENERIC_SPIRAM/sdkconfig.board2
-rw-r--r--ports/esp32/boards/UM_TINYPICO/sdkconfig.board3
3 files changed, 6 insertions, 0 deletions
diff --git a/ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake b/ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake
index 2e1d799b9..dcffe5f01 100644
--- a/ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake
+++ b/ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake
@@ -2,4 +2,5 @@ set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.ble
boards/sdkconfig.spiram
+ boards/GENERIC_SPIRAM/sdkconfig.board
)
diff --git a/ports/esp32/boards/GENERIC_SPIRAM/sdkconfig.board b/ports/esp32/boards/GENERIC_SPIRAM/sdkconfig.board
new file mode 100644
index 000000000..a2859acb5
--- /dev/null
+++ b/ports/esp32/boards/GENERIC_SPIRAM/sdkconfig.board
@@ -0,0 +1,2 @@
+# SPIRAM increases the size of the firmware, use -Os to reduce it again to fit in iram
+CONFIG_COMPILER_OPTIMIZATION_SIZE=y
diff --git a/ports/esp32/boards/UM_TINYPICO/sdkconfig.board b/ports/esp32/boards/UM_TINYPICO/sdkconfig.board
index 766419c7f..8ed083e62 100644
--- a/ports/esp32/boards/UM_TINYPICO/sdkconfig.board
+++ b/ports/esp32/boards/UM_TINYPICO/sdkconfig.board
@@ -3,3 +3,6 @@ CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
CONFIG_SPIRAM_SPEED_80M=y
CONFIG_ESP32_REV_MIN_1=y
CONFIG_LWIP_LOCAL_HOSTNAME="UMTinyPICO"
+
+# SPIRAM increases the size of the firmware, use -Os to reduce it again to fit in iram
+CONFIG_COMPILER_OPTIMIZATION_SIZE=y