forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
samples: usb: mass Raspberry Pi Pico Support
Added a flash partition for the mass storage example. Signed-off-by: Kelly Lord <[email protected]>
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>; | ||
}; | ||
}; |