Skip to content

Commit efe5a30

Browse files
walidbadarkartben
authored andcommitted
samples: fs_sample: add native_sim board support
Add native_sim conf and overlay Signed-off-by: Muhammad Waleed Badar <[email protected]>
1 parent c457eba commit efe5a30

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# Copyright (c) 2025 Ezurio LLC
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
CONFIG_DISK_DRIVERS=y
7+
CONFIG_DISK_DRIVER_FLASH=y
8+
# There may be no file on internal flash, so this Kconfig
9+
# option has been enabled to create some if listing does not
10+
# find any initially.
11+
CONFIG_FS_SAMPLE_CREATE_SOME_ENTRIES=y
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (c) 2023 Nordic Semiconductor ASA
3+
* Copyright (c) 2025 Muhammad Waleed Badar
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
/delete-node/ &storage_partition;
9+
10+
&flash0 {
11+
partitions {
12+
compatible = "fixed-partitions";
13+
#address-cells = <1>;
14+
#size-cells = <1>;
15+
16+
storage_partition: partition@f0000 {
17+
label = "storage";
18+
reg = <0x000f0000 DT_SIZE_K(64)>;
19+
};
20+
};
21+
};
22+
23+
/ {
24+
msc_disk0 {
25+
status = "okay";
26+
compatible = "zephyr,flash-disk";
27+
partition = <&storage_partition>;
28+
disk-name = "SD";
29+
cache-size = <4096>;
30+
};
31+
};

0 commit comments

Comments
 (0)