Save the program
Save allows you to save a range of memory or a program or the whole of flash from the device to a BIN file or a UF2 file.
$ picotool help save
SAVE:
Ê Save the program / memory stored in flash on the device to a file.
SYNOPSYS:
Ê picotool save [-p] [--bus <bus>] [--address <addr>] <filename> [-t <type>]
Ê picotool save -a [--bus <bus>] [--address <addr>] <filename> [-t <type>]
Ê picotool save -r <from> <to> [--bus <bus>] [--address <addr>] <filename> [-t <type>]
OPTIONS:
Ê Selection of data to save
Ê -p, --program
Ê Save the installed program only. This is the default
Ê -a, --all
Ê Save all of flash memory
Ê -r, --range
Ê Save a range of memory; note that the range is expanded to 256 byte boundaries
Ê <from>
Ê The lower address bound in hex
Ê <to>
Ê The upper address bound in hex
Ê Source device selection
Ê --bus <bus>
Ê Filter devices by USB bus number
Ê --address <addr>
Ê Filter devices by USB device address
Ê File to save to
Ê <filename>
Ê The file name
Ê -t <type>
Ê Specify file type (uf2 | elf | bin) explicitly, ignoring file extension
For example,
$ sudo picotool info
Program Information
name: lcd_1602_i2c
web site: https://github.com/raspberrypi/pico-examples/tree/HEAD/i2c/lcd_1602_i2c
$ picotool save spoon.uf2
Saving file: [==============================] 100%
Wrote 51200 bytes to spoon.uf2
$ picotool info spoon.uf2
File spoon.uf2:
Program Information
name: lcd_1602_i2c
web site: https://github.com/raspberrypi/pico-examples/tree/HEAD/i2c/lcd_1602_i2c
Binary Information
Binary information is machine-locatable and generally machine-consumable. I say generally because anyone can
include any information, and we can tell it from ours, but it is up to them whether they make their data self-describing.
Getting started with Raspberry Pi Pico
Binary Information 69