Skip to content

Commit 928466d

Browse files
committed
rp2/Makefile: Add deploy target that uses picotool load.
This is a convenient way to deploy firmware to an RP2xxx-based board. Signed-off-by: Damien George <damien@micropython.org>
1 parent d00eab4 commit 928466d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

ports/rp2/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ all:
6767
clean:
6868
$(RM) -rf $(BUILD)
6969

70+
deploy: all
71+
$(Q)picotool load -x $(BUILD)/firmware.elf
72+
7073
# First ensure that pico-sdk is initialised, then run CMake with the
7174
# UPDATE_SUBMODULES flag to update necessary submodules for this board.
7275
#

ports/rp2/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ pass the board name to the build; e.g. for Raspberry Pi Pico W:
4747
## Deploying firmware to the device
4848

4949
Firmware can be deployed to the device by putting it into bootloader mode
50-
(hold down BOOTSEL while powering on or resetting) and then copying
51-
`firmware.uf2` to the USB mass storage device that appears.
50+
(hold down BOOTSEL while powering on or resetting) and then either copying
51+
`firmware.uf2` to the USB mass storage device that appears, or using
52+
`picotool load -x firmware.elf`. The latter command can be accessed
53+
conveniently via `make deploy`.
5254

5355
If MicroPython is already installed then the bootloader can be entered by
5456
executing `import machine; machine.bootloader()` at the REPL.

0 commit comments

Comments
 (0)