feat(buzzy): add buzzy board support with SPI flash, fix build warnings

- Register BOARD_ROOT in CMakeLists.txt and sysbuild/CMakeLists.txt
- Add boardRoots to VS Code settings for board picker
- buzzy.dts: add nordic,pm-ext-flash chosen, external-flash and i2s-audio aliases
- nrf52840dk overlay: add external-flash alias (mirrors qspi-flash)
- fs_mgmt/Kconfig: select SPI_NOR for BOARD_BUZZY, NORDIC_QSPI_NOR for DK
- fs_mgmt.c: use external-flash alias instead of qspi-flash
- audio.c: bound snprintf to avoid truncation warning
- prj.conf: remove STACK_SENTINEL (conflicts with MPU_STACK_GUARD)
- mcuboot.conf: remove UART_CONSOLE (no SERIAL on buzzy)
- Delete mcuboot.overlay (no serial recovery needed)

Both buzzy/nrf52840 and nrf52840dk/nrf52840 build cleanly with zero warnings.
This commit is contained in:
2026-05-07 11:00:14 +02:00
parent 79676e2e1e
commit ad2dc19641
9 changed files with 13 additions and 19 deletions

View File

@@ -14,6 +14,7 @@
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
nordic,pm-ext-flash = &mx25r64;
};
/* SD_MODE pin for MAX98357A power gating */
@@ -88,6 +89,7 @@
chg-status = &chg_status;
chg-fast = &chg_fast;
external-flash = &mx25r64;
i2s-audio = &i2s0;
};
};

View File

@@ -3,6 +3,7 @@
nordic,pm-ext-flash = &mx25r64;
};
aliases {
external-flash = &mx25r64;
qspi-flash = &mx25r64;
i2s-audio = &i2s0;
};

View File

@@ -186,7 +186,8 @@ static int audio_select_random_to_buf(char *buf, size_t buf_size)
{
if (current_index == random_index)
{
snprintf(buf, buf_size, "%s/%s", FS_AUDIO_PATH, entry.name);
snprintf(buf, buf_size, "%s/%.*s", FS_AUDIO_PATH,
(int)(buf_size - sizeof(FS_AUDIO_PATH) - 1U), entry.name);
LOG_DBG("Selected random audio file: %s", buf);
found = true;
break;

View File

@@ -7,7 +7,9 @@ menuconfig FS_MGMT
select FILE_SYSTEM_LITTLEFS
select FILE_SYSTEM_MKFS
select FLASH_PAGE_LAYOUT
select NORDIC_QSPI_NOR if SOC_SERIES_NRF52X && (SOC_NRF52840_QIAA || SOC_NRF52833_QIAA)
select SPI_NOR if BOARD_BUZZY
select PM_OVERRIDE_EXTERNAL_DRIVER_CHECK if BOARD_BUZZY
select NORDIC_QSPI_NOR if BOARD_NRF52840DK_NRF52840
help
Library for initializing and managing the file system.

View File

@@ -14,8 +14,8 @@ LOG_MODULE_REGISTER(fs_mgmt, CONFIG_FS_MGMT_LOG_LEVEL);
#define FS_PARTITION_ID FLASH_AREA_ID(littlefs_storage)
FS_LITTLEFS_DECLARE_DEFAULT_CONFIG(fs_storage_data);
#define QSPI_FLASH_NODE DT_ALIAS(qspi_flash)
static const struct device *flash_dev = DEVICE_DT_GET(QSPI_FLASH_NODE);
#define EXTERNAL_FLASH_NODE DT_ALIAS(external_flash)
static const struct device *flash_dev = DEVICE_DT_GET(EXTERNAL_FLASH_NODE);
#define TAG_MAGIC "TAG!"
#define TAG_FORMAT_VERSION 1U

View File

@@ -16,4 +16,3 @@ CONFIG_PM_DEVICE=y
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_INIT_STACKS=y
CONFIG_THREAD_STACK_INFO=y
CONFIG_STACK_SENTINEL=y

View File

@@ -1,6 +1,5 @@
CONFIG_LOG=y
# CONFIG_MCUBOOT_SERIAL=y
CONFIG_UART_CONSOLE=y
# CONFIG_SINGLE_APPLICATION_SLOT=n
# CONFIG_MCUBOOT_INDICATION_LED=y
# CONFIG_BOOT_SERIAL_CDC_ACM=y

View File

@@ -1,13 +0,0 @@
/ {
aliases {
mcuboot-button0 = &button0;
mcuboot-led0 = &led0;
};
};
/* Step 2.1 - Configure CDC ACM */
&zephyr_udc0 {
cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
};
};