From df86cef59ac3f92fcdc433e4679c8243a8c3159d Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Wed, 9 Mar 2022 23:28:52 +0200 Subject: [PATCH] rp2: 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. --- ports/rp2/CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ports/rp2/CMakeLists.txt b/ports/rp2/CMakeLists.txt index 0ceb039675..bf3a51be99 100644 --- a/ports/rp2/CMakeLists.txt +++ b/ports/rp2/CMakeLists.txt @@ -33,7 +33,9 @@ if(NOT EXISTS ${MICROPY_BOARD_DIR}/mpconfigboard.cmake) message(FATAL_ERROR "Invalid MICROPY_BOARD specified: ${MICROPY_BOARD}") endif() -# Include board config +set(MICROPY_USER_FROZEN_MANIFEST ${MICROPY_FROZEN_MANIFEST}) + +# Include board config, it may override MICROPY_FROZEN_MANIFEST include(${MICROPY_BOARD_DIR}/mpconfigboard.cmake) # Set the PICO_BOARD if it's not already set (allow a board to override it). @@ -216,9 +218,13 @@ if (MICROPY_PY_NETWORK_NINAW10) ) endif() -# Define mpy-cross flags and frozen manifest +# Define mpy-cross flags set(MICROPY_CROSS_FLAGS -march=armv7m) -if (NOT MICROPY_FROZEN_MANIFEST) + +# Set the frozen manifest file +if (MICROPY_USER_FROZEN_MANIFEST) + set(MICROPY_FROZEN_MANIFEST ${MICROPY_USER_FROZEN_MANIFEST}) +elseif (NOT MICROPY_FROZEN_MANIFEST) set(MICROPY_FROZEN_MANIFEST ${PROJECT_SOURCE_DIR}/boards/manifest.py) endif()