summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-01-06 16:49:57 +1100
committerDamien George <damien@micropython.org>2022-01-06 16:49:57 +1100
commit4693cf90811de4c891bc01084f142365f483b232 (patch)
tree0c68f64153830da3e62172b66de6d5352f0c787a
parentd4997c7b60607febf81945bd8ad0ac0b758041d8 (diff)
rp2/CMakeLists.txt: Allow a board to override PICO_BOARD.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/rp2/CMakeLists.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/ports/rp2/CMakeLists.txt b/ports/rp2/CMakeLists.txt
index c87ccf0d6..0009ab2cd 100644
--- a/ports/rp2/CMakeLists.txt
+++ b/ports/rp2/CMakeLists.txt
@@ -25,11 +25,6 @@ if(NOT MICROPY_BOARD)
set(MICROPY_BOARD PICO)
endif()
-# Set the PICO_BOARD if it's not already set.
-if(NOT PICO_BOARD)
- string(TOLOWER ${MICROPY_BOARD} PICO_BOARD)
-endif()
-
# Set the board directory and check that it exists.
if(NOT MICROPY_BOARD_DIR)
set(MICROPY_BOARD_DIR ${MICROPY_PORT_DIR}/boards/${MICROPY_BOARD})
@@ -41,6 +36,11 @@ endif()
# Include board config
include(${MICROPY_BOARD_DIR}/mpconfigboard.cmake)
+# Set the PICO_BOARD if it's not already set (allow a board to override it).
+if(NOT PICO_BOARD)
+ string(TOLOWER ${MICROPY_BOARD} PICO_BOARD)
+endif()
+
# Include component cmake fragments
include(${MICROPY_DIR}/py/py.cmake)
include(${MICROPY_DIR}/extmod/extmod.cmake)