Skip to content

Commit a40aba3

Browse files
VynDragondpgeorge
authored andcommitted
zephyr/boards: Setup rpi_pico to use Zephyr FS instead of MPY FS.
Use new Zephyr FS, and be a demonstration of that configuration. This is still on-disk compatible with existing filesystems on the internal flash. Signed-off-by: Vdragon <mail@massdriver.space>
1 parent 559eb7c commit a40aba3

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

ports/zephyr/boards/rpi_pico.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,13 @@ CONFIG_SPI=y
1818

1919
# MicroPython config.
2020
CONFIG_MICROPY_HEAP_SIZE=196608
21+
22+
# File System Configuration
23+
CONFIG_FILE_SYSTEM=y
24+
CONFIG_FILE_SYSTEM_LITTLEFS=y
25+
CONFIG_FILE_SYSTEM_MKFS=y
26+
CONFIG_MICROPY_VFS_FAT=n
27+
CONFIG_MICROPY_VFS_LFS1=n
28+
CONFIG_MICROPY_VFS_LFS2=n
29+
# Default heap for littlefs is too small
30+
CONFIG_FS_LITTLEFS_FC_HEAP_SIZE=8192

ports/zephyr/boards/rpi_pico.overlay

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@
99
/* Use USB CDC ACM as the console. */
1010
zephyr,console = &cdc_acm_uart0;
1111
};
12+
13+
fstab {
14+
compatible = "zephyr,fstab";
15+
lfs: lfs {
16+
compatible = "zephyr,fstab,littlefs";
17+
mount-point = "/flash";
18+
partition = <&storage_partition>;
19+
read-size=<16>;
20+
prog-size=<256>;
21+
cache-size=<1024>;
22+
lookahead-size=<32>;
23+
block-cycles=<4>;
24+
};
25+
};
1226
};
1327

1428
/* Delete defined partitions and make a layout matching the rp2 port RPI_PICO configuration. */

0 commit comments

Comments
 (0)