From 4693cf90811de4c891bc01084f142365f483b232 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 6 Jan 2022 16:49:57 +1100 Subject: [PATCH] rp2/CMakeLists.txt: Allow a board to override PICO_BOARD. Signed-off-by: Damien George --- ports/rp2/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/rp2/CMakeLists.txt b/ports/rp2/CMakeLists.txt index c87ccf0d65..0009ab2cdb 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)