From d0758d8a33dfbe1778d2285315d80badd6e92836 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 11 Dec 2023 12:01:40 +1100 Subject: [PATCH] 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 --- ports/esp32/boards/ESP32_GENERIC/mpconfigboard.cmake | 3 +++ ports/esp32/mpconfigport.h | 2 ++ 2 files changed, 5 insertions(+) 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)