rp2/CMakeLists.txt: Make board's pins.csv configurable.

Allow `mpconfigboard.cmake` to specify a custom `MICROPY_BOARD_PINS` to
override `${MICROPY_BOARD_DIR}/pins.csv`.

Signed-off-by: Phil Howard <github@gadgetoid.com>
This commit is contained in:
Phil Howard
2025-03-28 14:06:26 +00:00
committed by Damien George
parent dc8daad3c9
commit 1a060e87cd

View File

@@ -654,9 +654,13 @@ if(NOT PICO_NUM_EXT_GPIOS)
set(PICO_NUM_EXT_GPIOS 10)
endif()
if(EXISTS "${MICROPY_BOARD_DIR}/pins.csv")
set(GEN_PINS_BOARD_CSV "${MICROPY_BOARD_DIR}/pins.csv")
set(GEN_PINS_CSV_ARG --board-csv "${GEN_PINS_BOARD_CSV}")
if(NOT MICROPY_BOARD_PINS)
set(MICROPY_BOARD_PINS "${MICROPY_BOARD_DIR}/pins.csv")
endif()
if(EXISTS "${MICROPY_BOARD_PINS}")
set(GEN_PINS_BOARD_CSV "${MICROPY_BOARD_PINS}")
set(GEN_PINS_CSV_ARG --board-csv "${MICROPY_BOARD_PINS}")
endif()
target_sources(${MICROPY_TARGET} PRIVATE