From 21fee92be6c534d0d44518c0c76f0c7cf5f64b18 Mon Sep 17 00:00:00 2001 From: Steve App Date: Sun, 25 Apr 2021 11:05:47 +0100 Subject: [PATCH] esp32: Restore FROZEN_MANIFEST support with new CMake build system. This commit re-enables the command-line make option "FROZEN_MANIFEST". The boards/*/mpconfigboard.cmake will now use the command-line FROZEN_MANIFEST value if supplied. Usage: make FROZEN_MANIFEST=~/foo/my-manifest.py --- ports/esp32/Makefile | 4 ++++ ports/esp32/boards/GENERIC/mpconfigboard.cmake | 5 +++-- ports/esp32/boards/GENERIC_D2WD/mpconfigboard.cmake | 4 +++- ports/esp32/boards/GENERIC_OTA/mpconfigboard.cmake | 4 +++- ports/esp32/boards/GENERIC_S2/mpconfigboard.cmake | 4 +++- ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake | 4 +++- ports/esp32/boards/TINYPICO/mpconfigboard.cmake | 4 +++- 7 files changed, 22 insertions(+), 7 deletions(-) diff --git a/ports/esp32/Makefile b/ports/esp32/Makefile index 39b740ffae..5a40cd9569 100644 --- a/ports/esp32/Makefile +++ b/ports/esp32/Makefile @@ -26,6 +26,10 @@ endif IDFPY_FLAGS += -D MICROPY_BOARD=$(BOARD) -B $(BUILD) $(CMAKE_ARGS) +ifdef FROZEN_MANIFEST + IDFPY_FLAGS += -D MICROPY_FROZEN_MANIFEST=$(FROZEN_MANIFEST) +endif + all: idf.py $(IDFPY_FLAGS) build @$(PYTHON) makeimg.py \ diff --git a/ports/esp32/boards/GENERIC/mpconfigboard.cmake b/ports/esp32/boards/GENERIC/mpconfigboard.cmake index f69b05f47b..4aaa0420d9 100644 --- a/ports/esp32/boards/GENERIC/mpconfigboard.cmake +++ b/ports/esp32/boards/GENERIC/mpconfigboard.cmake @@ -2,5 +2,6 @@ set(SDKCONFIG_DEFAULTS boards/sdkconfig.base boards/sdkconfig.ble ) - -set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py) +if(NOT MICROPY_FROZEN_MANIFEST) + set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py) +endif() diff --git a/ports/esp32/boards/GENERIC_D2WD/mpconfigboard.cmake b/ports/esp32/boards/GENERIC_D2WD/mpconfigboard.cmake index 686c78df97..729377a5b4 100644 --- a/ports/esp32/boards/GENERIC_D2WD/mpconfigboard.cmake +++ b/ports/esp32/boards/GENERIC_D2WD/mpconfigboard.cmake @@ -4,4 +4,6 @@ set(SDKCONFIG_DEFAULTS boards/GENERIC_D2WD/sdkconfig.board ) -set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py) +if(NOT MICROPY_FROZEN_MANIFEST) + set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py) +endif() diff --git a/ports/esp32/boards/GENERIC_OTA/mpconfigboard.cmake b/ports/esp32/boards/GENERIC_OTA/mpconfigboard.cmake index ca552d470c..88c0efa218 100644 --- a/ports/esp32/boards/GENERIC_OTA/mpconfigboard.cmake +++ b/ports/esp32/boards/GENERIC_OTA/mpconfigboard.cmake @@ -4,4 +4,6 @@ set(SDKCONFIG_DEFAULTS boards/GENERIC_OTA/sdkconfig.board ) -set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py) +if(NOT MICROPY_FROZEN_MANIFEST) + set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py) +endif() diff --git a/ports/esp32/boards/GENERIC_S2/mpconfigboard.cmake b/ports/esp32/boards/GENERIC_S2/mpconfigboard.cmake index 23d52e8b94..73f2b24e66 100644 --- a/ports/esp32/boards/GENERIC_S2/mpconfigboard.cmake +++ b/ports/esp32/boards/GENERIC_S2/mpconfigboard.cmake @@ -5,4 +5,6 @@ set(SDKCONFIG_DEFAULTS boards/sdkconfig.usb ) -set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py) +if(NOT MICROPY_FROZEN_MANIFEST) + set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py) +endif() diff --git a/ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake b/ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake index 2128edb592..bb38f7df2b 100644 --- a/ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake +++ b/ports/esp32/boards/GENERIC_SPIRAM/mpconfigboard.cmake @@ -4,4 +4,6 @@ set(SDKCONFIG_DEFAULTS boards/sdkconfig.spiram ) -set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py) +if(NOT MICROPY_FROZEN_MANIFEST) + set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py) +endif() diff --git a/ports/esp32/boards/TINYPICO/mpconfigboard.cmake b/ports/esp32/boards/TINYPICO/mpconfigboard.cmake index 5c31f5c600..0c65103a85 100644 --- a/ports/esp32/boards/TINYPICO/mpconfigboard.cmake +++ b/ports/esp32/boards/TINYPICO/mpconfigboard.cmake @@ -6,4 +6,6 @@ set(SDKCONFIG_DEFAULTS boards/TINYPICO/sdkconfig.board ) -set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) +if(NOT MICROPY_FROZEN_MANIFEST) + set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) +endif()