Skip to content

Commit

Permalink
samples: usb: mass Raspberry Pi Pico Support
Browse files Browse the repository at this point in the history
Added a flash partition for the mass storage example.

Signed-off-by: Kelly Lord <[email protected]>
  • Loading branch information
hlord2000 authored and nashif committed Mar 2, 2024
1 parent 6fa4397 commit cf4f90a
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions samples/subsys/usb/mass/boards/rpi_pico.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2024 Kelly Lord
*
* SPDX-License-Identifier: Apache-2.0
*/

/delete-node/ &code_partition;

&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

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

storage_partition: partition@100000 {
label = "storage";
reg = <0x100000 DT_SIZE_M(1)>;
};
};
};

/ {
msc_disk0 {
compatible = "zephyr,flash-disk";
partition = <&storage_partition>;
disk-name = "NAND";
cache-size = <4096>;
};
};

0 comments on commit cf4f90a

Please sign in to comment.