Skip to content

Commit

Permalink
rp2: Allow Overriding cmake frozen manifest from the command line.
Browse files Browse the repository at this point in the history
If MICROPY_FROZEN_MANIFEST is set from the cmake command line, then it will
override the default and any manifest set by the board.
  • Loading branch information
iabdalkader authored and dpgeorge committed Mar 24, 2022
1 parent fe8b47e commit df86cef
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions ports/rp2/CMakeLists.txt
Expand Up @@ -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).
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit df86cef

Please sign in to comment.