summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPhil Howard <github@gadgetoid.com>2025-03-28 14:06:26 +0000
committerDamien George <damien@micropython.org>2025-06-19 10:47:50 +1000
commit1a060e87cd413241b526bfd6ed4f94c72f748285 (patch)
treead85073bbe8f06cf7428aab8348a18e80dbea69b
parentdc8daad3c90d48efb50f5f0469346fae8402540d (diff)
downloadmicropython-1a060e87cd413241b526bfd6ed4f94c72f748285.tar.gz
micropython-1a060e87cd413241b526bfd6ed4f94c72f748285.zip
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>
-rw-r--r--ports/rp2/CMakeLists.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/ports/rp2/CMakeLists.txt b/ports/rp2/CMakeLists.txt
index cf9f180792..b9776012a0 100644
--- a/ports/rp2/CMakeLists.txt
+++ b/ports/rp2/CMakeLists.txt
@@ -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