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:
Christoph Heller 2022-05-13 19:01:35 +02:00 committed by Carles Cufí
commit 12532ee13d
2 changed files with 45 additions and 0 deletions

View 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

View 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)>;
};
};
};