Skip to content

Commit fc6dd45

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 279699a commit fc6dd45

File tree

4 files changed

+101
-0
lines changed

4 files changed

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