Skip to content

Commit ae3d528

Browse files
stephanelsmithdpgeorge
authored andcommitted
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 micropython#8260.
1 parent fe9eaf1 commit ae3d528

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ set(SDKCONFIG_DEFAULTS
22
boards/sdkconfig.base
33
boards/sdkconfig.ble
44
boards/sdkconfig.spiram
5+
boards/GENERIC_SPIRAM/sdkconfig.board
56
)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPIRAM increases the size of the firmware, use -Os to reduce it again to fit in iram
2+
CONFIG_COMPILER_OPTIMIZATION_SIZE=y

ports/esp32/boards/UM_TINYPICO/sdkconfig.board

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
33
CONFIG_SPIRAM_SPEED_80M=y
44
CONFIG_ESP32_REV_MIN_1=y
55
CONFIG_LWIP_LOCAL_HOSTNAME="UMTinyPICO"
6+
7+
# SPIRAM increases the size of the firmware, use -Os to reduce it again to fit in iram
8+
CONFIG_COMPILER_OPTIMIZATION_SIZE=y

0 commit comments

Comments
 (0)