summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-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 74cb591c07..0e1945dd8c 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 91ee3188ca..5f5cd795e1 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)