summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoriabdalkader <i.abdalkader@gmail.com>2021-08-20 14:03:14 +0200
committerDamien George <damien@micropython.org>2021-08-29 12:20:01 +1000
commit79baef843b29b098ec34789e5b9f46a66753cd01 (patch)
treedeeeb03e539ccb07f1368ff191956719acd8f0ba
parentc82244a7c0bba14564187057e46ffc871fad2404 (diff)
downloadmicropython-79baef843b29b098ec34789e5b9f46a66753cd01.tar.gz
micropython-79baef843b29b098ec34789e5b9f46a66753cd01.zip
rp2/CMakeLists.txt: Add option to enable double tap reset to bootrom.
* For boards a with reset switch, pressing twice resets into bootloader. * Enabled by linking with the pico_bootsel_via_double_reset library.
-rw-r--r--ports/rp2/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/ports/rp2/CMakeLists.txt b/ports/rp2/CMakeLists.txt
index 34fabbc8bd..fd7ec65e0f 100644
--- a/ports/rp2/CMakeLists.txt
+++ b/ports/rp2/CMakeLists.txt
@@ -222,6 +222,13 @@ target_link_libraries(${MICROPY_TARGET}
${PICO_SDK_COMPONENTS}
)
+if (MICROPY_HW_ENABLE_DOUBLE_TAP)
+# Enable double tap reset into bootrom.
+target_link_libraries(${MICROPY_TARGET}
+ pico_bootsel_via_double_reset
+)
+endif()
+
# todo this is a bit brittle, but we want to move a few source files into RAM (which requires
# a linker script modification) until we explicitly add macro calls around the function
# defs to move them into RAM.