esp32: Allow overriding cmake frozen manifest from the command line.

If MICROPY_FROZEN_MANIFEST is set from the cmake command line, then it will
override the default and any manifest set by the board.
This commit is contained in:
iabdalkader 2022-04-03 18:22:17 +02:00 committed by Damien George
parent 86e6744ff5
commit 5682595d75
19 changed files with 18 additions and 63 deletions

View File

@ -24,9 +24,20 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake)
# Define the output sdkconfig so it goes in the build directory.
set(SDKCONFIG ${CMAKE_BINARY_DIR}/sdkconfig)
# Save the manifest file set from the cmake command line.
set(MICROPY_USER_FROZEN_MANIFEST ${MICROPY_FROZEN_MANIFEST})
# Include board config; this is expected to set SDKCONFIG_DEFAULTS (among other options).
include(${MICROPY_BOARD_DIR}/mpconfigboard.cmake)
# Set the frozen manifest file. Note if MICROPY_FROZEN_MANIFEST is set from the cmake
# command line, then it will override the default and any manifest set by the board.
if (MICROPY_USER_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_USER_FROZEN_MANIFEST})
elseif (NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
endif()
# Add sdkconfig fragments that depend on the IDF version.
if(IDF_VERSION_MAJOR EQUAL 4 AND IDF_VERSION_MINOR LESS 2)
set(SDKCONFIG_DEFAULTS ${SDKCONFIG_DEFAULTS} boards/sdkconfig.nimble_core0)

View File

@ -6,7 +6,3 @@ set(SDKCONFIG_DEFAULTS
boards/sdkconfig.usb
boards/ESP32_S2_WROVER/sdkconfig.board
)
if(NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
endif()

View File

@ -2,6 +2,3 @@ set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.ble
)
if(NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
endif()

View File

@ -4,7 +4,3 @@ set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.ble
)
if(NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
endif()

View File

@ -5,7 +5,3 @@ set(SDKCONFIG_DEFAULTS
boards/sdkconfig.ble
boards/GENERIC_C3_USB/sdkconfig.board
)
if(NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
endif()

View File

@ -3,7 +3,3 @@ set(SDKCONFIG_DEFAULTS
boards/sdkconfig.ble
boards/GENERIC_D2WD/sdkconfig.board
)
if(NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
endif()

View File

@ -3,7 +3,3 @@ set(SDKCONFIG_DEFAULTS
boards/sdkconfig.ble
boards/GENERIC_OTA/sdkconfig.board
)
if(NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
endif()

View File

@ -4,7 +4,3 @@ set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.usb
)
if(NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
endif()

View File

@ -6,7 +6,3 @@ set(SDKCONFIG_DEFAULTS
boards/sdkconfig.ble
boards/GENERIC_S3/sdkconfig.board
)
if(NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
endif()

View File

@ -6,7 +6,3 @@ set(SDKCONFIG_DEFAULTS
boards/sdkconfig.spiram_sx
boards/GENERIC_S3_SPIRAM/sdkconfig.board
)
if(NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
endif()

View File

@ -3,7 +3,3 @@ set(SDKCONFIG_DEFAULTS
boards/sdkconfig.ble
boards/sdkconfig.spiram
)
if(NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
endif()

View File

@ -2,6 +2,5 @@ set(SDKCONFIG_DEFAULTS
boards/sdkconfig.base
boards/sdkconfig.ble
)
if(NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
endif()
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)

View File

@ -6,6 +6,4 @@ set(SDKCONFIG_DEFAULTS
boards/LOLIN_C3_MINI/sdkconfig.board
)
if(NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
endif()
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)

View File

@ -6,6 +6,4 @@ set(SDKCONFIG_DEFAULTS
boards/sdkconfig.usb
)
if(NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
endif()
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)

View File

@ -6,6 +6,4 @@ set(SDKCONFIG_DEFAULTS
boards/sdkconfig.usb
)
if(NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
endif()
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)

View File

@ -5,6 +5,4 @@ set(SDKCONFIG_DEFAULTS
boards/M5STACK_ATOM/sdkconfig.board
)
if(NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
endif()
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)

View File

@ -4,7 +4,3 @@ set(SDKCONFIG_DEFAULTS
boards/sdkconfig.240mhz
boards/SIL_WESP32/sdkconfig.board
)
if(NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)
endif()

View File

@ -6,6 +6,4 @@ set(SDKCONFIG_DEFAULTS
boards/UM_TINYPICO/sdkconfig.board
)
if(NOT MICROPY_FROZEN_MANIFEST)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
endif()
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)

View File

@ -4,5 +4,3 @@ set(SDKCONFIG_DEFAULTS
boards/sdkconfig.spiram_sx
boards/sdkconfig.usb
)
set(MICROPY_FROZEN_MANIFEST ${MICROPY_PORT_DIR}/boards/manifest.py)