make file system universal across all boards

This commit is contained in:
liquidraver
2026-03-09 11:38:43 +01:00
parent 37c07b29f0
commit 6cccd55d6b
4 changed files with 11 additions and 32 deletions
-7
View File
@@ -25,13 +25,6 @@ CONFIG_ASSERT=y
# Silabs BLE stack requires larger heap (override zephcore_common 2KB default)
CONFIG_HEAP_MEM_POOL_SIZE=32768
# ========== Storage ==========
# BLE bonds via file-based settings on LittleFS (same as nRF52)
CONFIG_NVS=n
CONFIG_SETTINGS_NVS=n
CONFIG_SETTINGS_FILE=y
CONFIG_SETTINGS_FILE_PATH="/lfs/settings"
# ========== ADC ==========
# No battery voltage divider on MG24 boards — disable ADC driver
CONFIG_ADC=n
-7
View File
@@ -35,13 +35,6 @@ CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=y
# Boards with QSPI (Wio Tracker L1) override in board.conf.
CONFIG_NORDIC_QSPI_NOR=n
# ========== Storage ==========
# BLE bonds via file-based settings on LittleFS (replaces NVS).
CONFIG_NVS=n
CONFIG_SETTINGS_NVS=n
CONFIG_SETTINGS_FILE=y
CONFIG_SETTINGS_FILE_PATH="/lfs/settings"
# ========== SEGGER RTT (J-Link debug) ==========
# RTT log backend is in boards/common/logging.conf (only included for debug builds).
CONFIG_USE_SEGGER_RTT=y
+7 -3
View File
@@ -152,10 +152,14 @@ CONFIG_SETTINGS_RUNTIME=y
# ========== Flash & Storage (common to ALL platforms) ==========
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_SETTINGS=y
# BLE bonds via file-based settings on LittleFS (all platforms)
CONFIG_NVS=n
CONFIG_SETTINGS_NVS=n
CONFIG_SETTINGS_FILE=y
CONFIG_SETTINGS_FILE_PATH="/lfs/settings"
# LittleFS for DataStore
CONFIG_FILE_SYSTEM=y
+4 -15
View File
@@ -21,10 +21,6 @@
lora0 = &lora;
};
chosen {
zephyr,settings-partition = &storage_partition;
};
/* No battery voltage divider on this board — disable ADC battery reading */
/delete-node/ zephyr,user;
};
@@ -76,8 +72,7 @@
*
* 0x00000 - 0x0C000 (48KB) MCUboot (reserved)
* 0x0C000 - 0x15C000 (1344KB) Application (slot0 — expanded into slot1 space)
* 0x15C000 - 0x160000 (16KB) NVS storage (BLE bonds) — 2 sectors × 8KB
* 0x160000 - 0x180000 (128KB) LittleFS (identity, contacts, channels)
* 0x15C000 - 0x180000 (144KB) LittleFS (identity, contacts, channels, BLE bonds)
*/
/delete-node/ &slot0_partition;
/delete-node/ &slot1_partition;
@@ -91,16 +86,10 @@
reg = <0x0C000 0x150000>; /* 1344KB */
};
/* NVS 16KB for BLE bonds + settings (2 × 8KB sectors) */
storage_partition: partition@15c000 {
label = "storage";
reg = <0x15C000 0x4000>;
};
/* LittleFS 128KB for DataStore */
lfs_partition: partition@160000 {
/* LittleFS 144KB for DataStore + file-based BLE settings */
lfs_partition: partition@15c000 {
label = "lfs";
reg = <0x160000 0x20000>;
reg = <0x15C000 0x24000>;
};
};
};