From fca4aeb1156de9a4656e5c0fd1ef569de22328af Mon Sep 17 00:00:00 2001 From: Eduard Iten Date: Mon, 11 May 2026 12:18:14 +0200 Subject: [PATCH] sync --- firmware/boards/buzzy_nrf52840.conf | 9 +++++---- firmware/boards/iten/buzzy/buzzy_defconfig | 2 +- firmware/debug.conf | 8 ++++++++ firmware/libs/audio/CMakeLists.txt | 2 +- firmware/libs/audio/Kconfig | 6 +++--- firmware/libs/fs_mgmt/src/fs_mgmt.c | 10 +++++++++- firmware/prj.conf | 6 ------ 7 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 firmware/debug.conf diff --git a/firmware/boards/buzzy_nrf52840.conf b/firmware/boards/buzzy_nrf52840.conf index 9d58850..6e54c67 100644 --- a/firmware/boards/buzzy_nrf52840.conf +++ b/firmware/boards/buzzy_nrf52840.conf @@ -1,7 +1,8 @@ -### Console / Logging: RTT (no UART on buzzy) -CONFIG_UART_CONSOLE=n +### Console / Logging: RTT +CONFIG_USE_SEGGER_RTT=y CONFIG_CONSOLE=y CONFIG_RTT_CONSOLE=y -CONFIG_USE_SEGGER_RTT=y -CONFIG_LOG_BACKEND_RTT=y + +CONFIG_UART_CONSOLE=n CONFIG_LOG_BACKEND_UART=n +CONFIG_LOG_BACKEND_RTT=y diff --git a/firmware/boards/iten/buzzy/buzzy_defconfig b/firmware/boards/iten/buzzy/buzzy_defconfig index 8f9f4e3..e323c36 100644 --- a/firmware/boards/iten/buzzy/buzzy_defconfig +++ b/firmware/boards/iten/buzzy/buzzy_defconfig @@ -2,4 +2,4 @@ CONFIG_ARM_MPU=y CONFIG_HW_STACK_PROTECTION=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y -CONFIG_CLOCK_CONTROL_NRF_K32SRC_20PPM=y \ No newline at end of file +CONFIG_CLOCK_CONTROL_NRF_K32SRC_20PPM=y diff --git a/firmware/debug.conf b/firmware/debug.conf new file mode 100644 index 0000000..e3bb52c --- /dev/null +++ b/firmware/debug.conf @@ -0,0 +1,8 @@ +### Logging +CONFIG_LOG=y +CONFIG_AUDIO_LOG_LEVEL_DBG=y + +CONFIG_DEBUG_OPTIMIZATIONS=y + +CONFIG_INIT_STACKS=y +CONFIG_THREAD_STACK_INFO=y diff --git a/firmware/libs/audio/CMakeLists.txt b/firmware/libs/audio/CMakeLists.txt index dce6f25..9e0e7b5 100644 --- a/firmware/libs/audio/CMakeLists.txt +++ b/firmware/libs/audio/CMakeLists.txt @@ -1,4 +1,4 @@ -if(CONFIG_AUDIO) +if(CONFIG_BUZZ_AUDIO) zephyr_library() zephyr_library_sources(src/audio.c) zephyr_include_directories(include) diff --git a/firmware/libs/audio/Kconfig b/firmware/libs/audio/Kconfig index ed0fb48..7dff698 100644 --- a/firmware/libs/audio/Kconfig +++ b/firmware/libs/audio/Kconfig @@ -1,10 +1,10 @@ -menuconfig AUDIO +menuconfig BUZZ_AUDIO bool "Audio handling" default y select I2S select POLL -if AUDIO +if BUZZ_AUDIO config AUDIO_NO_SAMPLES_SAMPLE string "Audio no samples sample" default "404" @@ -57,4 +57,4 @@ if AUDIO module = AUDIO module-str = audio source "subsys/logging/Kconfig.template.log_config" -endif # AUDIO \ No newline at end of file + endif # BUZZ_AUDIO \ No newline at end of file diff --git a/firmware/libs/fs_mgmt/src/fs_mgmt.c b/firmware/libs/fs_mgmt/src/fs_mgmt.c index c59ac94..ed9d333 100644 --- a/firmware/libs/fs_mgmt/src/fs_mgmt.c +++ b/firmware/libs/fs_mgmt/src/fs_mgmt.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -11,7 +12,14 @@ LOG_MODULE_REGISTER(fs_mgmt, CONFIG_FS_MGMT_LOG_LEVEL); -#define FS_PARTITION_ID FLASH_AREA_ID(littlefs_storage) +/* Prefer external LittleFS partition when present, otherwise internal storage partition. */ +#if DT_NODE_EXISTS(DT_NODELABEL(ext_flash_lfs)) +#define FS_PARTITION_ID FIXED_PARTITION_ID(ext_flash_lfs) +#elif DT_NODE_EXISTS(DT_NODELABEL(storage_partition)) +#define FS_PARTITION_ID FIXED_PARTITION_ID(storage_partition) +#else +#error "No compatible LittleFS partition node label found (expected ext_flash_lfs or storage_partition)" +#endif FS_LITTLEFS_DECLARE_DEFAULT_CONFIG(fs_storage_data); #define EXTERNAL_FLASH_NODE DT_ALIAS(external_flash) diff --git a/firmware/prj.conf b/firmware/prj.conf index 270c9b0..f539f05 100644 --- a/firmware/prj.conf +++ b/firmware/prj.conf @@ -1,7 +1,3 @@ -### Logging -CONFIG_LOG=y -CONFIG_AUDIO_LOG_LEVEL_DBG=y - ### Bluetooth CONFIG_BLE_MGMT=y @@ -14,5 +10,3 @@ CONFIG_PM_DEVICE=y ### Stack CONFIG_MAIN_STACK_SIZE=2048 -CONFIG_INIT_STACKS=y -CONFIG_THREAD_STACK_INFO=y