summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2023-12-11 12:01:40 +1100
committerDamien George <damien@micropython.org>2023-12-11 13:00:06 +1100
commitd0758d8a33dfbe1778d2285315d80badd6e92836 (patch)
treedd3187ab006c8358ce45f216ea87eccada3d2bf9
parentb4b77c17b551e103e45bcfe55df819c636b8617c (diff)
esp32/boards/ESP32_GENERIC: Disable network.LAN and VM-opt on D2WD.
To reduce firmware size, because IDF v5.0.4 has increased in size. Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/esp32/boards/ESP32_GENERIC/mpconfigboard.cmake3
-rw-r--r--ports/esp32/mpconfigport.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/ports/esp32/boards/ESP32_GENERIC/mpconfigboard.cmake b/ports/esp32/boards/ESP32_GENERIC/mpconfigboard.cmake
index 74cb591c0..0e1945dd8 100644
--- a/ports/esp32/boards/ESP32_GENERIC/mpconfigboard.cmake
+++ b/ports/esp32/boards/ESP32_GENERIC/mpconfigboard.cmake
@@ -11,6 +11,9 @@ if(MICROPY_BOARD_VARIANT STREQUAL "D2WD")
list(APPEND MICROPY_DEF_BOARD
MICROPY_HW_MCU_NAME="ESP32-D2WD"
+ # Disable some options to reduce firmware size.
+ MICROPY_OPT_COMPUTED_GOTO=0
+ MICROPY_PY_NETWORK_LAN=0
)
endif()
diff --git a/ports/esp32/mpconfigport.h b/ports/esp32/mpconfigport.h
index 91ee3188c..5f5cd795e 100644
--- a/ports/esp32/mpconfigport.h
+++ b/ports/esp32/mpconfigport.h
@@ -40,7 +40,9 @@
#define MICROPY_COMP_CONST_FOLDING_COMPILER_WORKAROUND (1)
// optimisations
+#ifndef MICROPY_OPT_COMPUTED_GOTO
#define MICROPY_OPT_COMPUTED_GOTO (1)
+#endif
// Python internal features
#define MICROPY_READER_VFS (1)