samples: littlefs: Add support for nucleo_h7a3zi_q board
Add specific configuration and DTS overlay files for NUCLEO-H7A3ZI-Q board to the littlefs example project. The second half of the SOC flash is used as flash partition for littlefs. Signed-off-by: Christoph Heller <chris@metanetics.de>
This commit is contained in:
parent
a36995e2a3
commit
12532ee13d
2 changed files with 45 additions and 0 deletions
10
samples/subsys/fs/littlefs/boards/nucleo_h7a3zi_q.conf
Normal file
10
samples/subsys/fs/littlefs/boards/nucleo_h7a3zi_q.conf
Normal file
|
@ -0,0 +1,10 @@
|
|||
#
|
||||
# Copyright (c) 2022 Christoph Heller
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
# Set MPU to allow write accesses to flash memory.
|
||||
# This is required by the flash driver to be able
|
||||
# to write to the internal flash.
|
||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
35
samples/subsys/fs/littlefs/boards/nucleo_h7a3zi_q.overlay
Normal file
35
samples/subsys/fs/littlefs/boards/nucleo_h7a3zi_q.overlay
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) 2022 Christoph Heller
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/ {
|
||||
fstab {
|
||||
compatible = "zephyr,fstab";
|
||||
lfs1: lfs1 {
|
||||
compatible = "zephyr,fstab,littlefs";
|
||||
read-size = <1>;
|
||||
prog-size = <16>;
|
||||
cache-size = <256>;
|
||||
lookahead-size = <32>;
|
||||
block-cycles = <512>;
|
||||
partition = <&lfs1_partition>;
|
||||
mount-point = "/lfs1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
/* Use second half of flash for the filesystem. */
|
||||
lfs1_partition: partition@100000 {
|
||||
label = "storage";
|
||||
reg = <0x10000 DT_SIZE_K(1024)>;
|
||||
};
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue