Skip to content

Add persistent partition to RPi Pico Flash #87918

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions boards/raspberrypi/rpi_pico/rpi_pico-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,25 @@
};

/*
* Usable flash. Starts at 0x100, after the bootloader. The partition
* size is 2MB minus the 0x100 bytes taken by the bootloader.
* Usable flash. Starts at 0x100, after the bootloader. The code partition
* size is flash size minus the 0x100 bytes taken by the bootloader, and
* minus the size of the storage partition.
*/
code_partition: partition@100 {
label = "code-partition";
reg = <0x100 (DT_SIZE_M(2) - 0x100)>;
reg = <0x100 (DT_SIZE_M(2) - 0x100 - DT_SIZE_K(16))>;
read-only;
};

/*
* Area for placing a file system for persistent storage. Starts at the end
* of the code partition. The persistent storage size is chosen to have the
* capacity for a minimal 'littlefs' file system with 4 blocks.
*/
storage_partition: partition@1fc000 {
label = "storage-partition";
reg = <0x1fc000 DT_SIZE_K(16)>;
};
};
};

Expand Down
1 change: 1 addition & 0 deletions samples/subsys/usb/mass/boards/rpi_pico.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

/delete-node/ &code_partition;
/delete-node/ &storage_partition;

&flash0 {
partitions {
Expand Down