From 7bf9f40cc029fd9cfbd41535d8ad8d8c4ba23779 Mon Sep 17 00:00:00 2001 From: Phil Howard Date: Wed, 5 Mar 2025 14:04:08 +0000 Subject: [PATCH] CI: Enable py_decl filesystem overlap check. --- boards/common.cmake | 12 ++++++++---- boards/pimoroni_pico_plus2/mpconfigboard.cmake | 2 +- boards/pimoroni_plasma2350/mpconfigboard.cmake | 1 + boards/pimoroni_tiny2350/mpconfigboard.cmake | 2 ++ boards/rpi_pico2/mpconfigboard.cmake | 4 +++- boards/rpi_pico2_w/mpconfigboard.cmake | 4 +++- boards/rpi_pico2b/mpconfigboard.cmake | 2 ++ 7 files changed, 20 insertions(+), 7 deletions(-) diff --git a/boards/common.cmake b/boards/common.cmake index 50bac0f..c590385 100644 --- a/boards/common.cmake +++ b/boards/common.cmake @@ -7,10 +7,6 @@ find_package (Python COMPONENTS Interpreter Development) message("dir2uf2/py_decl: Using Python ${Python_EXECUTABLE}") MESSAGE("dir2uf2/py_decl: Using pimoroni tools dir ${PIMORONI_TOOLS_DIR}") -# Convert supplies paths to absolute, for a quieter life -get_filename_component(PIMORONI_UF2_MANIFEST ${PIMORONI_UF2_MANIFEST} REALPATH) -get_filename_component(PIMORONI_UF2_DIR ${PIMORONI_UF2_DIR} REALPATH) - if (EXISTS "${PIMORONI_TOOLS_DIR}/py_decl/py_decl.py") MESSAGE("py_decl: py_decl.py found, will verify uf2.") add_custom_target("${MICROPY_TARGET}-verify" ALL @@ -21,6 +17,12 @@ if (EXISTS "${PIMORONI_TOOLS_DIR}/py_decl/py_decl.py") ) endif() +if(DEFINED PIMORONI_UF2_MANIFEST AND DEFINED PIMORONI_UF2_DIR) + +# Convert supplies paths to absolute, for a quieter life +get_filename_component(PIMORONI_UF2_MANIFEST ${PIMORONI_UF2_MANIFEST} REALPATH) +get_filename_component(PIMORONI_UF2_DIR ${PIMORONI_UF2_DIR} REALPATH) + if (EXISTS "${PIMORONI_TOOLS_DIR}/dir2uf2/dir2uf2" AND EXISTS "${PIMORONI_UF2_MANIFEST}" AND EXISTS "${PIMORONI_UF2_DIR}") MESSAGE("dir2uf2: Using manifest ${PIMORONI_UF2_MANIFEST}.") MESSAGE("dir2uf2: Using root ${PIMORONI_UF2_DIR}.") @@ -34,4 +36,6 @@ if (EXISTS "${PIMORONI_TOOLS_DIR}/dir2uf2/dir2uf2" AND EXISTS "${PIMORONI_UF2_MA else() MESSAGE("dir2uf2: Could not find manifest ${PIMORONI_UF2_MANIFEST}") MESSAGE(" and/or root ${PIMORONI_UF2_DIR}.") +endif() + endif() \ No newline at end of file diff --git a/boards/pimoroni_pico_plus2/mpconfigboard.cmake b/boards/pimoroni_pico_plus2/mpconfigboard.cmake index 8ce8a25..ba0a447 100644 --- a/boards/pimoroni_pico_plus2/mpconfigboard.cmake +++ b/boards/pimoroni_pico_plus2/mpconfigboard.cmake @@ -40,4 +40,4 @@ set(MICROPY_PY_BLUETOOTH_CYW43 ON) # MICROPY_HW_ENABLE_PSRAM=1 set(MICROPY_HW_ENABLE_PSRAM ON) - +include(${CMAKE_CURRENT_LIST_DIR}/../common.cmake) diff --git a/boards/pimoroni_plasma2350/mpconfigboard.cmake b/boards/pimoroni_plasma2350/mpconfigboard.cmake index 1516676..34e4205 100644 --- a/boards/pimoroni_plasma2350/mpconfigboard.cmake +++ b/boards/pimoroni_plasma2350/mpconfigboard.cmake @@ -35,3 +35,4 @@ set(MICROPY_BLUETOOTH_BTSTACK ON) # MICROPY_PY_BLUETOOTH_CYW43 = 1 set(MICROPY_PY_BLUETOOTH_CYW43 ON) +include(${CMAKE_CURRENT_LIST_DIR}/../common.cmake) diff --git a/boards/pimoroni_tiny2350/mpconfigboard.cmake b/boards/pimoroni_tiny2350/mpconfigboard.cmake index db6a8b3..a8718d6 100644 --- a/boards/pimoroni_tiny2350/mpconfigboard.cmake +++ b/boards/pimoroni_tiny2350/mpconfigboard.cmake @@ -6,3 +6,5 @@ set(PICO_PLATFORM "rp2350") set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) set(MICROPY_C_HEAP_SIZE 4096) + +include(${CMAKE_CURRENT_LIST_DIR}/../common.cmake) diff --git a/boards/rpi_pico2/mpconfigboard.cmake b/boards/rpi_pico2/mpconfigboard.cmake index 1e97f02..adbe6ba 100644 --- a/boards/rpi_pico2/mpconfigboard.cmake +++ b/boards/rpi_pico2/mpconfigboard.cmake @@ -13,4 +13,6 @@ if (PICO_CYW43_SUPPORTED) set(PICO_PINS_CSV_NAME pins_cyw43.csv) endif() -set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) \ No newline at end of file +set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) + +include(${CMAKE_CURRENT_LIST_DIR}/../common.cmake) diff --git a/boards/rpi_pico2_w/mpconfigboard.cmake b/boards/rpi_pico2_w/mpconfigboard.cmake index 3dd942c..4ba1101 100644 --- a/boards/rpi_pico2_w/mpconfigboard.cmake +++ b/boards/rpi_pico2_w/mpconfigboard.cmake @@ -11,4 +11,6 @@ set(MICROPY_PY_LWIP ON) include(enable_cyw43.cmake) # Board specific version of the frozen manifest -set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) \ No newline at end of file +set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) + +include(${CMAKE_CURRENT_LIST_DIR}/../common.cmake) diff --git a/boards/rpi_pico2b/mpconfigboard.cmake b/boards/rpi_pico2b/mpconfigboard.cmake index 6ff6ef9..7114d5d 100644 --- a/boards/rpi_pico2b/mpconfigboard.cmake +++ b/boards/rpi_pico2b/mpconfigboard.cmake @@ -10,3 +10,5 @@ set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py) set(MICROPY_C_HEAP_SIZE 4096) set(PICO_NUM_GPIOS 48) + +include(${CMAKE_CURRENT_LIST_DIR}/../common.cmake)