Skip to content

Commit 1d9235a

Browse files
committed
samples: subsys: fs_little fs on stm32 qspi disco in xip
Gives a sample to execute the little fs on external memory map (XiP) where the lfs1 partition is in internal mcu flash Signed-off-by: Francois Ramu <[email protected]>
1 parent 066de8c commit 1d9235a

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

samples/subsys/fs/littlefs/boards/stm32h747i_disco_m7.overlay

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,35 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7+
/ {
8+
chosen {
9+
zephyr,code-partition = &slot1_partition;
10+
};
11+
12+
fstab {
13+
compatible = "zephyr,fstab";
14+
lfs1: lfs1 {
15+
compatible = "zephyr,fstab,littlefs";
16+
read-size = <256>;
17+
prog-size = <256>;
18+
cache-size = <4096>;
19+
lookahead-size = <256>;
20+
block-cycles = <512>;
21+
partition = <&lfs1_partition>;
22+
mount-point = "/lfs1";
23+
automount;
24+
};
25+
};
26+
};
27+
28+
&flash0 {
29+
partitions {
30+
lfs1_partition: partition@e0000 {
31+
reg = <0x000e0000 DT_SIZE_K(64)>;
32+
};
33+
};
34+
};
35+
736
&sdmmc1 {
837
sdmmc {
938
compatible = "zephyr,sdmmc-disk";
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright (c) 2024 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
chosen {
9+
zephyr,code-partition = &slot1_partition;
10+
};
11+
12+
fstab {
13+
compatible = "zephyr,fstab";
14+
lfs1: lfs1 {
15+
compatible = "zephyr,fstab,littlefs";
16+
read-size = <256>;
17+
prog-size = <256>;
18+
cache-size = <4096>;
19+
lookahead-size = <256>;
20+
block-cycles = <512>;
21+
partition = <&lfs1_partition>;
22+
mount-point = "/lfs1";
23+
automount;
24+
};
25+
};
26+
};
27+
28+
&flash0 {
29+
partitions {
30+
lfs1_partition: partition@e0000 {
31+
reg = <0x000e0000 DT_SIZE_K(64)>;
32+
};
33+
};
34+
};

0 commit comments

Comments
 (0)