From 91d75595003f4cd64f375ea3eef57f3f4c25799f Mon Sep 17 00:00:00 2001 From: Dennis Moschina <45356478+DennisMoschina@users.noreply.github.com> Date: Mon, 11 May 2026 11:19:51 +0200 Subject: [PATCH] build: make FOTA the default firmware layout --- .github/workflows/build_firmware.yaml | 3 +- CMakeLists.txt | 27 +- Kconfig | 25 +- Kconfig.defaults | 115 ++++++- Kconfig.sysbuild | 6 - VERSION | 4 +- boards/openearable_v2_nrf5340_cpuapp.overlay | 35 ++ boards/teco/openearable_v2/CMakeLists.txt | 3 +- boards/teco/openearable_v2/Kconfig | 5 +- cdc_acm_uart0_console.overlay | 19 -- pm_static_fota.yml => pm_static.yml | 0 prj.conf | 315 +++++++++--------- prj_fota.conf | 263 --------------- prj_release.conf | 6 - sample.yaml | 25 -- {unicast_server => src}/main.cpp | 113 +++---- sysbuild_fota.conf => sysbuild.conf | 6 - .../mcuboot/{app_fota.overlay => app.overlay} | 0 .../openearable_v2_nrf5340_cpuapp.overlay | 7 + ...openearable_v2_nrf5340_cpuapp_fota.overlay | 7 - sysbuild/mcuboot/{prj_fota.conf => prj.conf} | 0 tools/flash/{flash_fota.ps1 => flash.ps1} | 6 +- tools/flash/flash.sh | 64 ++-- tools/flash/flash_fota.sh | 119 ------- tools/flash/mcu-manager_upload.sh | 26 ++ tools/flash/mcumgr_upload.sh | 18 - tools/flash/recover.sh | 6 +- unicast_server/CMakeLists.txt | 8 - unicast_server/Kconfig.defaults | 116 ------- unicast_server/README.rst | 150 --------- unicast_server/overlay-unicast_server.conf | 49 --- 31 files changed, 448 insertions(+), 1098 deletions(-) create mode 100644 boards/openearable_v2_nrf5340_cpuapp.overlay delete mode 100644 cdc_acm_uart0_console.overlay rename pm_static_fota.yml => pm_static.yml (100%) delete mode 100644 prj_fota.conf delete mode 100644 sample.yaml rename {unicast_server => src}/main.cpp (56%) rename sysbuild_fota.conf => sysbuild.conf (75%) rename sysbuild/mcuboot/{app_fota.overlay => app.overlay} (100%) create mode 100644 sysbuild/mcuboot/boards/openearable_v2_nrf5340_cpuapp.overlay delete mode 100644 sysbuild/mcuboot/boards/openearable_v2_nrf5340_cpuapp_fota.overlay rename sysbuild/mcuboot/{prj_fota.conf => prj.conf} (100%) rename tools/flash/{flash_fota.ps1 => flash.ps1} (97%) delete mode 100755 tools/flash/flash_fota.sh create mode 100755 tools/flash/mcu-manager_upload.sh delete mode 100755 tools/flash/mcumgr_upload.sh delete mode 100644 unicast_server/CMakeLists.txt delete mode 100644 unicast_server/Kconfig.defaults delete mode 100644 unicast_server/README.rst delete mode 100644 unicast_server/overlay-unicast_server.conf diff --git a/.github/workflows/build_firmware.yaml b/.github/workflows/build_firmware.yaml index c2802f06..de7cbf44 100644 --- a/.github/workflows/build_firmware.yaml +++ b/.github/workflows/build_firmware.yaml @@ -93,8 +93,7 @@ jobs: # using VSCode + Nordic Plugins west build \ --board openearable_v2/nrf5340/cpuapp \ - --pristine=always open-earable-v2 \ - -- -DFILE_SUFFIX="fota" + --pristine=always open-earable-v2 # print detailed ccache statistics ccache -sv diff --git a/CMakeLists.txt b/CMakeLists.txt index ffa4b8fa..25161a8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,3 @@ -# -# Copyright (c) 2022 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - cmake_minimum_required(VERSION 3.20.0) # Flag which defines whether application is compiled as gateway/dongle or headset @@ -14,9 +8,8 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(openearable_v2_1) -#set(OVERLAY_CONFIG -# ${CMAKE_CURRENT_SOURCE_DIR}/unicast_server/overlay-unicast_server.conf -#) +# Suppress -Wwrite-strings from Zephyr SDK headers that we cannot fix. +add_compile_options(-Wno-write-strings) string(TIMESTAMP NRF5340_AUDIO_CORE_APP_COMP_DATE "%a %b %d %H:%M:%S %Y") @@ -27,24 +20,17 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/utils/fw_info_app.c.in" # Target sources below are specific to the nRF5340 Audio DK HW target_sources(app PRIVATE -# src/openearable_common.c + src/main.cpp ${CMAKE_BINARY_DIR}/fw_info_app.c ) -if (CONFIG_BT_BAP_BROADCAST_SINK) - add_subdirectory(broadcast_sink) -endif() - -if (CONFIG_BT_BAP_UNICAST_SERVER) - add_subdirectory(unicast_server) -endif() - # Include application events and configuration headers zephyr_library_include_directories( include src/audio src/Battery + src/buttons src/Wire src/bluetooth src/drivers @@ -88,3 +74,8 @@ endif() include(version.cmake) include_directories(${CMAKE_CURRENT_BINARY_DIR}/include) + +# New USB device stack sample init (provides sample_usbd_init_device) +if(CONFIG_USB_DEVICE_STACK_NEXT) + include(${ZEPHYR_BASE}/samples/subsys/usb/common/common.cmake) +endif() diff --git a/Kconfig b/Kconfig index 9106caf9..eafce14a 100644 --- a/Kconfig +++ b/Kconfig @@ -1,9 +1,3 @@ -# -# Copyright (c) 2018 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - menuconfig NRF5340_AUDIO bool "nRF5340 Audio [EXPERIMENTAL]" select EXPERIMENTAL @@ -38,23 +32,6 @@ config TRANSPORT_CIS endchoice -#----------------------------------------------------------------------------# -# if (TRANSPORT_BIS && AUDIO_DEV = 1) -# rsource "broadcast_sink/Kconfig.defaults" -# endif # TRANSPORT_BIS && AUDIO_DEV = 1 - -# if (TRANSPORT_BIS && AUDIO_DEV = 2) -# rsource "broadcast_source/Kconfig.defaults" -# endif # TRANSPORT_BIS && AUDIO_DEV = 2 - -# if (TRANSPORT_CIS && AUDIO_DEV = 1) -rsource "unicast_server/Kconfig.defaults" -# endif # TRANSPORT_CIS && AUDIO_DEV = 1 - -# if (TRANSPORT_CIS && AUDIO_DEV = 2) -# rsource "unicast_client/Kconfig.defaults" -# endif # TRANSPORT_CIS && AUDIO_DEV = 2 - rsource "Kconfig.defaults" rsource "src/audio/Kconfig" rsource "src/bluetooth/Kconfig" @@ -81,4 +58,6 @@ endmenu # Log levels #----------------------------------------------------------------------------# endif # NRF5340_AUDIO +rsource "$(ZEPHYR_BASE)/samples/subsys/usb/common/Kconfig.sample_usbd" + source "Kconfig.zephyr" diff --git a/Kconfig.defaults b/Kconfig.defaults index 3e98206f..4971c407 100644 --- a/Kconfig.defaults +++ b/Kconfig.defaults @@ -1,9 +1,3 @@ -# -# Copyright (c) 2022 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - config REBOOT default y @@ -126,3 +120,112 @@ config WATCHDOG config TASK_WDT default y + +# Bluetooth Audio / Unicast Server defaults +config BT_GATT_AUTO_DISCOVER_CCC + default y + +config BT_GATT_AUTO_RESUBSCRIBE + default n + +config BT_GATT_AUTO_SEC_REQ + default n + +config BT_GATT_AUTO_UPDATE_MTU + default y + +config BT_GATT_CACHING + default n + +config BT_GATT_CLIENT + default y + +config BT_GATT_DYNAMIC_DB + default y + +config BT_MAX_CONN + default 4 + +config BT_MAX_PAIRED + default 4 + +config BT_EXT_ADV + default y + +config BT_AUDIO + default y + +config BT_PERIPHERAL + default y + +config BT_ISO_PERIPHERAL + default y + +config BT_BAP_UNICAST_SERVER + default y + +config BT_CAP_ACCEPTOR + default y + +config BT_CAP_ACCEPTOR_SET_MEMBER + default y + +config BT_PAC_SNK + default y + +config BT_PAC_SNK_NOTIFIABLE + default y + +config BT_PAC_SRC + default y + +config BT_PAC_SRC_NOTIFIABLE + default y + +config BT_CSIP_SET_MEMBER + default y + +config BT_DEVICE_APPEARANCE + default 2369 + +config BT_ISO_MAX_CHAN + default 2 + +config BT_ASCS + default y + +config BT_ASCS_MAX_ASE_SNK_COUNT + default 1 + +config BT_ASCS_MAX_ASE_SRC_COUNT + default 1 + +config BT_VCP_VOL_REND + default y + +config BT_MCC + default y + +config BT_MCC_READ_MEDIA_STATE + default y + +config BT_MCC_SET_MEDIA_CONTROL_POINT + default y + +config BT_GAP_PERIPHERAL_PREF_PARAMS + default n + +config BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE + default 25 + +config LC3_ENC_CHAN_MAX + default 1 + +config LC3_DEC_CHAN_MAX + default 1 + +config MBEDTLS_ENABLE_HEAP + default y + +config MBEDTLS_HEAP_SIZE + default 2048 diff --git a/Kconfig.sysbuild b/Kconfig.sysbuild index ee679c15..631a561f 100644 --- a/Kconfig.sysbuild +++ b/Kconfig.sysbuild @@ -1,9 +1,3 @@ -# -# Copyright (c) 2024 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - config NRF_DEFAULT_IPC_RADIO default y diff --git a/VERSION b/VERSION index 0b3afa17..f4816897 100644 --- a/VERSION +++ b/VERSION @@ -1,5 +1,5 @@ VERSION_MAJOR = 2 VERSION_MINOR = 2 -PATCHLEVEL = 2 +PATCHLEVEL = 104 VERSION_TWEAK = 0 -EXTRAVERSION = +EXTRAVERSION = \ No newline at end of file diff --git a/boards/openearable_v2_nrf5340_cpuapp.overlay b/boards/openearable_v2_nrf5340_cpuapp.overlay new file mode 100644 index 00000000..76632c16 --- /dev/null +++ b/boards/openearable_v2_nrf5340_cpuapp.overlay @@ -0,0 +1,35 @@ +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; + +&qspi { + status = "disabled"; +}; + +&spi4 { + cs-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>,<&gpio1 1 GPIO_ACTIVE_LOW>; + status = "okay"; + mx25r64: mx25r6435f@1 { + compatible = "jedec,spi-nor"; + reg = <1>; + spi-max-frequency = <32000000>; + + jedec-id = [c2 28 17]; + sfdp-bfp = [ + e5 20 f1 ff ff ff ff 03 44 eb 08 6b 08 3b 04 bb + ee ff ff ff ff ff 00 ff ff ff 00 ff 0c 20 0f 52 + 10 d8 00 ff 23 72 f5 00 82 ed 04 cc 44 83 68 44 + 30 b0 30 b0 f7 c4 d5 5c 00 be 29 ff f0 d0 ff ff + ]; + size = <67108864>; + has-dpd; + t-enter-dpd = <10000>; + t-exit-dpd = <5000>; + dpd-wakeup-sequence = <30000 20 45000>; + mxicy,mx25r-power-mode = "high-performance"; + + zephyr,pm-device-runtime-auto; + }; +}; \ No newline at end of file diff --git a/boards/teco/openearable_v2/CMakeLists.txt b/boards/teco/openearable_v2/CMakeLists.txt index 85ad8dc0..c1488cbf 100644 --- a/boards/teco/openearable_v2/CMakeLists.txt +++ b/boards/teco/openearable_v2/CMakeLists.txt @@ -1,8 +1,7 @@ - if ((CONFIG_BOARD_OPENEARABLE_V2_NRF5340_CPUAPP OR CONFIG_BOARD_OPENEARABLE_V2_NRF5340_CPUAPP_NS) AND NOT CONFIG_MCUBOOT) zephyr_library() zephyr_library_sources(board_init.c) - # openearable_v2_nrf5340_cpunet_reset + zephyr_library_include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../include) # For openearable_common.h endif() if((CONFIG_BOARD_OPENEARABLE_V2_NRF5340_CPUAPP OR CONFIG_BOARD_OPENEARABLE_V2_NRF5340_CPUAPP_NS) AND CONFIG_MCUBOOT) diff --git a/boards/teco/openearable_v2/Kconfig b/boards/teco/openearable_v2/Kconfig index cdb77ccc..441ff93f 100644 --- a/boards/teco/openearable_v2/Kconfig +++ b/boards/teco/openearable_v2/Kconfig @@ -1,7 +1,4 @@ -# nRF5340 Audio DK board configuration - -# Copyright (c) 2019 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 +# OpenEarable v2 board configuration if BOARD_OPENEARABLE_V2_NRF5340_CPUAPP || BOARD_OPENEARABLE_V2_NRF5340_CPUAPP_NS diff --git a/cdc_acm_uart0_console.overlay b/cdc_acm_uart0_console.overlay deleted file mode 100644 index bfee6cb2..00000000 --- a/cdc_acm_uart0_console.overlay +++ /dev/null @@ -1,19 +0,0 @@ -// To get started, press Ctrl+Space (or Option+Esc) to bring up the completion menu and view the available nodes. - -// You can also use the buttons in the sidebar to perform actions on nodes. -// Actions currently available include: - -// * Enabling / disabling the node -// * Adding the bus to a bus -// * Removing the node -// * Connecting ADC channels - -// For more help, browse the DeviceTree documentation at https://docs.zephyrproject.org/latest/guides/dts/index.html -// You can also visit the nRF DeviceTree extension documentation at https://docs.nordicsemi.com/bundle/nrf-connect-vscode/page/guides/ncs_configure_app.html#devicetree-support-in-the-extension - -/ { - chosen { - zephyr,console = &cdc_acm_uart0; - zephyr,shell-uart = &cdc_acm_uart0; - }; -}; \ No newline at end of file diff --git a/pm_static_fota.yml b/pm_static.yml similarity index 100% rename from pm_static_fota.yml rename to pm_static.yml diff --git a/prj.conf b/prj.conf index 6e2a1100..0d386fda 100644 --- a/prj.conf +++ b/prj.conf @@ -1,190 +1,185 @@ -# -# Copyright (c) 2022 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# CONFIG_STATIC_INIT_GNU=y - -# nRF5340 Audio +# Audio +CONFIG_AUDIO_BT_MGMT_DFU=y +CONFIG_AUDIO_MIC_I2S=y +CONFIG_BLE_ACL_CONN_INTERVAL=8 +CONFIG_BT_AUDIO_RETRANSMITS=2 +#CONFIG_BT_AUDIO_MAX_TRANSPORT_LATENCY_MS=20 +#CONFIG_BT_AUDIO_PRESENTATION_DELAY_US=40000 +CONFIG_FDSP=y CONFIG_NRF5340_AUDIO=y +CONFIG_NRF5340_AUDIO_CS47L63_DRIVER=y +CONFIG_NRF5340_AUDIO_POWER_MEASUREMENT=n +CONFIG_NRF5340_AUDIO_SD_CARD_MODULE=y CONFIG_SAMPLE_RATE_CONVERTER=y CONFIG_SAMPLE_RATE_CONVERTER_FILTER_SIMPLE=y +CONFIG_STREAM_BIDIRECTIONAL=y +# CONFIG_NRFX_PDM=y -# General -CONFIG_DEBUG=y -CONFIG_DEBUG_INFO=y -CONFIG_ASSERT=y -CONFIG_STACK_USAGE=y -CONFIG_THREAD_RUNTIME_STATS=y -CONFIG_STACK_SENTINEL=y -CONFIG_INIT_STACKS=y - -# Uart driver -CONFIG_SERIAL=y +# Bluetooth +CONFIG_BT_ATT_PREPARE_COUNT=8 +CONFIG_BT_BUF_ACL_RX_SIZE=502 +CONFIG_BT_BUF_ACL_TX_SIZE=502 +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 +CONFIG_BT_CTLR_ISO_RX_BUFFERS=16 +CONFIG_BT_CTLR_ISO_TX_BUFFERS=16 +CONFIG_BT_CTLR_PHY_2M=y +CONFIG_BT_CTLR_PHY_CODED=n +CONFIG_BT_CTLR_RX_BUFFERS=8 +#CONFIG_BT_CTLR_TX_BUFFERS=8 +CONFIG_BT_DEVICE_NAME="OpenEarable" +CONFIG_BT_HCI_CORE_LOG_LEVEL_WRN=y +CONFIG_BT_ISO_RX_BUF_COUNT=8 +CONFIG_BT_ISO_TX_BUF_COUNT=4 +#CONFIG_BT_ISO_RX_MTU=498 +#CONFIG_BT_ISO_TX_MTU=498 +CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y +CONFIG_BT_L2CAP_TX_MTU=498 +CONFIG_BT_OBSERVER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_USER_DATA_LEN_UPDATE=y +CONFIG_BT_USER_PHY_UPDATE=y -# Logging -CONFIG_LOG=y +# C/C++ runtime +CONFIG_CPP=y +CONFIG_FPU=y +CONFIG_GLIBCXX_LIBCPP=y +CONFIG_NEWLIB_LIBC=y CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y -CONFIG_LOG_TAG_MAX_LEN=2 -CONFIG_LOG_TAG_DEFAULT="--" -CONFIG_LOG_BACKEND_UART=y -CONFIG_LOG_BUFFER_SIZE=4096 - -# Use this for debugging thread usage -#CONFIG_LOG_THREAD_ID_PREFIX=y +CONFIG_NEWLIB_LIBC_FLOAT_SCANF=y +CONFIG_SFLOAT=y +CONFIG_STD_CPP17=y -# Console related defines +# Console CONFIG_CONSOLE=y CONFIG_RTT_CONSOLE=y +CONFIG_STDOUT_CONSOLE=y CONFIG_UART_CONSOLE=y -# Shell related defines -CONFIG_SHELL=y -CONFIG_KERNEL_SHELL=y -CONFIG_USE_SEGGER_RTT=y -## Disable logs on RTT -CONFIG_SHELL_RTT_INIT_LOG_LEVEL_NONE=y -CONFIG_SHELL_BACKEND_RTT=y -CONFIG_SHELL_BACKEND_SERIAL=n -CONFIG_SHELL_VT100_COMMANDS=y -CONFIG_SHELL_VT100_COLORS=y -CONFIG_SHELL_STACK_SIZE=4096 -CONFIG_SHELL_CMD_BUFF_SIZE=128 -## Reduce shell memory usage -CONFIG_SHELL_WILDCARD=n -CONFIG_SHELL_HELP_ON_WRONG_ARGUMENT_COUNT=n -CONFIG_SHELL_STATS=n -CONFIG_SHELL_CMDS=n -CONFIG_SHELL_HISTORY=y - -# Turn off default shell commands -CONFIG_I2C_SHELL=n -CONFIG_HWINFO_SHELL=n -CONFIG_CLOCK_CONTROL_NRF_SHELL=n -CONFIG_FLASH_SHELL=n -CONFIG_DEVICE_SHELL=n +# Debug +CONFIG_ASSERT=y +CONFIG_DEBUG=y +CONFIG_DEBUG_INFO=y +CONFIG_INIT_STACKS=y +#CONFIG_RESET_ON_FATAL_ERROR=y +CONFIG_STACK_SENTINEL=y +CONFIG_STACK_USAGE=y +CONFIG_THREAD_RUNTIME_STATS=y -# Suppress LOG_ERR messages from sd_check_card_type. Because SPI_SDHC has no card presence method, -# assume card is in slot. Thus error message is always shown if card is not inserted +# Filesystem / SD card +CONFIG_DISK_ACCESS=y +CONFIG_DISK_DRIVER_SDMMC=y +CONFIG_DISK_DRIVERS=y +CONFIG_FAT_FILESYSTEM_ELM=y +CONFIG_FILE_SYSTEM=y +CONFIG_FS_FATFS_EXFAT=y +CONFIG_FS_FATFS_HAS_RTC=y +CONFIG_FS_FATFS_MOUNT_MKFS=n +CONFIG_SDHC=y +# Suppress LOG_ERR from sd_check_card_type (SPI_SDHC has no card presence method) CONFIG_SD_LOG_LEVEL_OFF=y -# Suppress LOG_INF messages from hci_core -CONFIG_BT_HCI_CORE_LOG_LEVEL_WRN=y - -# Michael: missing somehow -CONFIG_NRF5340_AUDIO_CS47L63_DRIVER=y -CONFIG_NRF5340_AUDIO_POWER_MEASUREMENT=n -CONFIG_NRF5340_AUDIO_SD_CARD_MODULE=y - -#Custom -CONFIG_NRFX_PWM1=y +# Flash (external) +CONFIG_FLASH=y +CONFIG_FLASH_MAP=y +CONFIG_NORDIC_QSPI_NOR=n +CONFIG_SPI_NOR=y +CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_SPI_NOR_SFDP_DEVICETREE=y +# I2C CONFIG_I2C=y CONFIG_I2C_NRFX=y +CONFIG_I2C_SHELL=y -CONFIG_POWEROFF=y - -CONFIG_PM=y # may cause delay issues for ISO stream ? +# Logging +CONFIG_LOG=y +CONFIG_LOG_BACKEND_RTT=n +CONFIG_LOG_BACKEND_UART=n +CONFIG_LOG_BUFFER_SIZE=8192 +CONFIG_LOG_PROCESS_THREAD_SLEEP_MS=100 +# CONFIG_LOG_DEFAULT_LEVEL=4 +CONFIG_LOG_TAG_DEFAULT="--" +CONFIG_LOG_TAG_MAX_LEN=2 +#CONFIG_LOG_THREAD_ID_PREFIX=y +CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=4096 +CONFIG_USBD_LOG_LEVEL_WRN=y + +# MCUmgr / DFU +CONFIG_BASE64=y +CONFIG_CRC=y +CONFIG_IMG_MANAGER=y +CONFIG_MCUMGR=y +CONFIG_MCUMGR_GRP_IMG=y +CONFIG_MCUMGR_GRP_IMG_STATUS_HOOKS=y +CONFIG_MCUMGR_GRP_IMG_UPLOAD_CHECK_HOOK=y +CONFIG_MCUMGR_GRP_OS=y +CONFIG_MCUMGR_GRP_OS_RESET_HOOK=y +CONFIG_MCUMGR_MGMT_NOTIFICATION_HOOKS=y +CONFIG_MCUMGR_SMP_COMMAND_STATUS_HOOKS=y +CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y +CONFIG_MCUMGR_TRANSPORT_UART=n +CONFIG_NET_BUF=y +CONFIG_STREAM_FLASH=y +CONFIG_ZCBOR=y + +# Power management +CONFIG_PM=n # Seems like a good idea, but not currently used in any way. CONFIG_PM_DEVICE=y CONFIG_PM_DEVICE_RUNTIME=y +CONFIG_PM_DEVICE_POWER_DOMAIN=y +CONFIG_POWEROFF=y -CONFIG_BT_DEVICE_NAME="OpenEarable" - -#CONFIG_USB_CDC_ACM_LOG_LEVEL_DBG=y - -CONFIG_BT_PERIPHERAL=y -CONFIG_BT_OBSERVER=y - -CONFIG_SFLOAT=y - -CONFIG_FPU=y - -CONFIG_NEWLIB_LIBC=y -CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y -CONFIG_NEWLIB_LIBC_FLOAT_SCANF=y - -CONFIG_CPP=y -CONFIG_GLIBCXX_LIBCPP=y -CONFIG_STD_CPP17=y - -#CONFIG_USB=y -CONFIG_USB_CDC_ACM=y - -CONFIG_USB_DEVICE_STACK=y -CONFIG_USB_DEVICE_PRODUCT="OpenEarable v2" -CONFIG_USB_DEVICE_PID=0x0004 -CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n +# PWM +CONFIG_NRFX_PWM1=y +# Serial / UART +CONFIG_SERIAL=y CONFIG_UART_LINE_CTRL=y -CONFIG_BT_USER_DATA_LEN_UPDATE=y -CONFIG_BT_USER_PHY_UPDATE=y - -CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 -CONFIG_BT_BUF_ACL_RX_SIZE=502 -CONFIG_BT_BUF_ACL_TX_SIZE=502 -CONFIG_BT_L2CAP_TX_MTU=498 -CONFIG_BT_CTLR_PHY_2M=y -CONFIG_BT_CTLR_PHY_CODED=n - -CONFIG_BT_ISO_TX_BUF_COUNT=1 -CONFIG_BT_ISO_RX_BUF_COUNT=1 - -#CONFIG_BT_BUF_ACL_TX_COUNT=20 -#CONFIG_BT_L2CAP_TX_BUF_COUNT=20 - -#CONFIG_BT_ISO_RX_MTU=498 -#CONFIG_BT_ISO_TX_MTU=498 - -CONFIG_BT_ATT_PREPARE_COUNT=8 -CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y - -#CONFIG_BT_AUDIO_PRESENTATION_DELAY_US=40000 -#CONFIG_BT_AUDIO_MAX_TRANSPORT_LATENCY_MS=20 - -CONFIG_BT_AUDIO_RETRANSMITS=2 - -CONFIG_BLE_ACL_CONN_INTERVAL=8 - -CONFIG_BT_PERIPHERAL=y -CONFIG_BT_OBSERVER=y - -CONFIG_SFLOAT=y - -#CONFIG_RESET_ON_FATAL_ERROR=y - -CONFIG_STREAM_BIDIRECTIONAL=y - -# CONFIG_NRFX_PDM=y - -CONFIG_AUDIO_MIC_I2S=y - -# CONFIG_LOG_DEFAULT_LEVEL=4 - -CONFIG_SPI_NRFX_RAM_BUFFER_SIZE=4096 +# Shell +CONFIG_SHELL=y +CONFIG_SHELL_BACKEND_RTT=y +CONFIG_SHELL_BACKEND_SERIAL=n +CONFIG_SHELL_CMD_BUFF_SIZE=128 +CONFIG_SHELL_CMDS=n +CONFIG_SHELL_HELP_ON_WRONG_ARGUMENT_COUNT=n +CONFIG_SHELL_HISTORY=y +CONFIG_SHELL_RTT_INIT_LOG_LEVEL_DEFAULT=y +CONFIG_SHELL_STACK_SIZE=4096 +CONFIG_SHELL_STATS=n +CONFIG_SHELL_VT100_COLORS=y +CONFIG_SHELL_VT100_COMMANDS=y +CONFIG_SHELL_WILDCARD=n +# Disable default shell commands +CONFIG_CLOCK_CONTROL_NRF_SHELL=n +CONFIG_DEVICE_SHELL=n +CONFIG_FLASH_SHELL=n +CONFIG_HWINFO_SHELL=n +CONFIG_I2C_SHELL=y +CONFIG_KERNEL_SHELL=y +CONFIG_USE_SEGGER_RTT=y +# SPI CONFIG_SPI=y CONFIG_SPI_NRFX=y -CONFIG_DISK_ACCESS=y -CONFIG_SDHC=y - -CONFIG_LOG=y -CONFIG_FILE_SYSTEM=y -CONFIG_FAT_FILESYSTEM_ELM=y - -# Enable SDHC interface -CONFIG_DISK_DRIVERS=y -CONFIG_DISK_DRIVER_SDMMC=y - -CONFIG_FS_FATFS_MOUNT_MKFS=y # Enable automatic formatting -CONFIG_FS_FATFS_EXFAT=y # Enable exFAT support - -CONFIG_FDSP=y +CONFIG_SPI_NRFX_RAM_BUFFER_SIZE=4096 +# Misc +CONFIG_SETUP_FUEL_GAUGE=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 -#CONFIG_USB_MASS_STORAGE=y -#CONFIG_MASS_STORAGE_STACK_SIZE=1024 -#CONFIG_MASS_STORAGE_DISK_NAME="SD" -#CONFIG_APP_MSC_STORAGE_SDCARD=y +# USB +#CONFIG_USB_CDC_ACM_LOG_LEVEL_DBG=y +CONFIG_USB_DEVICE_STACK_NEXT=y +CONFIG_USBD_CDC_ACM_CLASS=n +# USB Mass Storage +CONFIG_USBD_MSC_CLASS=y +CONFIG_USBD_MSC_LUNS_PER_INSTANCE=1 +CONFIG_USBD_MSC_SCSI_BUFFER_SIZE=16384 +CONFIG_SAMPLE_USBD_MANUFACTURER="OpenEarable" +CONFIG_SAMPLE_USBD_PID=0x0004 +CONFIG_SAMPLE_USBD_PRODUCT="OpenEarable v2" +CONFIG_SAMPLE_USBD_SELF_POWERED=y + +CONFIG_NCS_BOOT_BANNER=y +CONFIG_NCS_APPLICATION_BOOT_BANNER_STRING="OpenEarable v2" \ No newline at end of file diff --git a/prj_fota.conf b/prj_fota.conf deleted file mode 100644 index 6b7263a0..00000000 --- a/prj_fota.conf +++ /dev/null @@ -1,263 +0,0 @@ -# -# Copyright (c) 2022 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -# CONFIG_STATIC_INIT_GNU=y - -# nRF5340 Audio -CONFIG_NRF5340_AUDIO=y -CONFIG_SAMPLE_RATE_CONVERTER=y -CONFIG_SAMPLE_RATE_CONVERTER_FILTER_SIMPLE=y - -# General -CONFIG_DEBUG=y -CONFIG_DEBUG_INFO=y -CONFIG_ASSERT=y -CONFIG_STACK_USAGE=y -CONFIG_THREAD_RUNTIME_STATS=y -CONFIG_STACK_SENTINEL=y -CONFIG_INIT_STACKS=y - -# Uart driver -CONFIG_SERIAL=y - -# Logging -CONFIG_LOG=y -CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y -CONFIG_LOG_TAG_MAX_LEN=2 -CONFIG_LOG_TAG_DEFAULT="--" -CONFIG_LOG_BACKEND_UART=y -CONFIG_LOG_BUFFER_SIZE=4096 - -# Use this for debugging thread usage -#CONFIG_LOG_THREAD_ID_PREFIX=y - -# Console related defines -CONFIG_CONSOLE=y -CONFIG_RTT_CONSOLE=y -CONFIG_UART_CONSOLE=y -CONFIG_STDOUT_CONSOLE=y - -# Shell related defines -CONFIG_SHELL=y -CONFIG_KERNEL_SHELL=y -CONFIG_USE_SEGGER_RTT=y -## Disable logs on RTT -CONFIG_SHELL_RTT_INIT_LOG_LEVEL_NONE=y -CONFIG_SHELL_BACKEND_RTT=y -CONFIG_SHELL_BACKEND_SERIAL=n -CONFIG_SHELL_VT100_COMMANDS=y -CONFIG_SHELL_VT100_COLORS=y -CONFIG_SHELL_STACK_SIZE=4096 -CONFIG_SHELL_CMD_BUFF_SIZE=128 -## Reduce shell memory usage -CONFIG_SHELL_WILDCARD=n -CONFIG_SHELL_HELP_ON_WRONG_ARGUMENT_COUNT=n -CONFIG_SHELL_STATS=n -CONFIG_SHELL_CMDS=n -CONFIG_SHELL_HISTORY=y - -# Turn off default shell commands -CONFIG_I2C_SHELL=n -CONFIG_HWINFO_SHELL=n -CONFIG_CLOCK_CONTROL_NRF_SHELL=n -CONFIG_FLASH_SHELL=n -CONFIG_DEVICE_SHELL=n - -# Suppress LOG_ERR messages from sd_check_card_type. Because SPI_SDHC has no card presence method, -# assume card is in slot. Thus error message is always shown if card is not inserted -CONFIG_SD_LOG_LEVEL_OFF=y - -# Suppress LOG_INF messages from hci_core -CONFIG_BT_HCI_CORE_LOG_LEVEL_WRN=y - -# DFU -CONFIG_AUDIO_BT_MGMT_DFU=y -CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y -CONFIG_BT_L2CAP_TX_MTU=498 -CONFIG_BT_BUF_ACL_TX_SIZE=251 - -# External Flash -CONFIG_FLASH=y -CONFIG_FLASH_MAP=y -CONFIG_SPI_NOR=y -CONFIG_SPI_NOR_SFDP_DEVICETREE=y - -# Michael: missing somehow -CONFIG_NRF5340_AUDIO_CS47L63_DRIVER=y -CONFIG_NRF5340_AUDIO_POWER_MEASUREMENT=n -CONFIG_NRF5340_AUDIO_SD_CARD_MODULE=y - -#Custom -CONFIG_NRFX_PWM1=y - -CONFIG_I2C=y -CONFIG_I2C_NRFX=y - -CONFIG_POWEROFF=y - -#CONFIG_PM=y -CONFIG_PM_DEVICE=y -CONFIG_PM_DEVICE_RUNTIME=y - -CONFIG_BT_DEVICE_NAME="OpenEarable" - -#CONFIG_USB_CDC_ACM_LOG_LEVEL_DBG=y - -CONFIG_BT_PERIPHERAL=y -CONFIG_BT_OBSERVER=y - -CONFIG_SFLOAT=y - -CONFIG_FPU=y - -CONFIG_NEWLIB_LIBC=y -CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y -CONFIG_NEWLIB_LIBC_FLOAT_SCANF=y - -CONFIG_CPP=y -CONFIG_GLIBCXX_LIBCPP=y -CONFIG_STD_CPP17=y - -#CONFIG_USB=y -CONFIG_USB_CDC_ACM=y - -CONFIG_USB_DEVICE_STACK=y -CONFIG_USB_DEVICE_PRODUCT="OpenEarable v2" -CONFIG_USB_DEVICE_PID=0x0004 -CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n - -CONFIG_UART_LINE_CTRL=y - -CONFIG_BT_USER_DATA_LEN_UPDATE=y -CONFIG_BT_USER_PHY_UPDATE=y - -CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 -CONFIG_BT_BUF_ACL_RX_SIZE=502 -CONFIG_BT_BUF_ACL_TX_SIZE=502 -CONFIG_BT_L2CAP_TX_MTU=498 -CONFIG_BT_CTLR_PHY_2M=y -CONFIG_BT_CTLR_PHY_CODED=n - -CONFIG_BT_ISO_TX_BUF_COUNT=4 -CONFIG_BT_ISO_RX_BUF_COUNT=8 - -CONFIG_BT_CTLR_RX_BUFFERS=8 -#CONFIG_BT_CTLR_TX_BUFFERS=8 - -CONFIG_BT_CTLR_ISO_TX_BUFFERS=16 -CONFIG_BT_CTLR_ISO_RX_BUFFERS=16 - -#CONFIG_BT_ISO_RX_MTU=498 -#CONFIG_BT_ISO_TX_MTU=498 - -CONFIG_BT_ATT_PREPARE_COUNT=8 -CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y - -#CONFIG_BT_AUDIO_PRESENTATION_DELAY_US=40000 -#CONFIG_BT_AUDIO_MAX_TRANSPORT_LATENCY_MS=20 - -CONFIG_BT_AUDIO_RETRANSMITS=2 - -CONFIG_BLE_ACL_CONN_INTERVAL=8 - -CONFIG_BT_PERIPHERAL=y -CONFIG_BT_OBSERVER=y - -CONFIG_SFLOAT=y - -#CONFIG_RESET_ON_FATAL_ERROR=y - -CONFIG_STREAM_BIDIRECTIONAL=y - -# CONFIG_NRFX_PDM=y - -CONFIG_AUDIO_MIC_I2S=y - -# CONFIG_LOG_DEFAULT_LEVEL=4 - -CONFIG_SPI_NRFX_RAM_BUFFER_SIZE=4096 - -CONFIG_SPI=y -CONFIG_SPI_NRFX=y -CONFIG_DISK_ACCESS=y -CONFIG_SDHC=y - -CONFIG_LOG=y -CONFIG_FILE_SYSTEM=y -CONFIG_FAT_FILESYSTEM_ELM=y - -# Enable SDHC interface -CONFIG_DISK_DRIVERS=y -CONFIG_DISK_DRIVER_SDMMC=y - -CONFIG_FS_FATFS_MOUNT_MKFS=n # Disable automatic formatting -CONFIG_FS_FATFS_EXFAT=y # Enable exFAT support - -CONFIG_FDSP=y - -CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 - -#CONFIG_USB_MASS_STORAGE=y -#CONFIG_MASS_STORAGE_STACK_SIZE=1024 - -################################################## - -# Step 1.1 - Enable SPI driver for the application -#CONFIG_GPIO=y -#CONFIG_SPI=y -#CONFIG_SPI_NOR=y -#CONFIG_SPI_NOR_SFDP_DEVICETREE=y -CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 -# QSPI drivers are enabled by defualt for some chips. -# Disable it explicitly to be sure QSPI is disabled. -CONFIG_NORDIC_QSPI_NOR=n - -# STEP 5.3 - Enable USB subsystem -CONFIG_USB_DEVICE_STACK=y -CONFIG_UART_LINE_CTRL=y -CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n - -# STEP 5.2 - Enable mcumgr DFU in application -# Enable MCUMGR -CONFIG_MCUMGR=y - -# Enable MCUMGR management for both OS and Images -CONFIG_MCUMGR_GRP_OS=y -CONFIG_MCUMGR_GRP_IMG=y - -# Configure MCUMGR transport to UART -CONFIG_MCUMGR_TRANSPORT_UART=y - -# Dependencies -# Configure dependencies for CONFIG_MCUMGR -CONFIG_NET_BUF=y -CONFIG_ZCBOR=y -CONFIG_CRC=y - -# Configure dependencies for CONFIG_MCUMGR_GRP_IMG -CONFIG_FLASH=y -CONFIG_IMG_MANAGER=y - -# Configure dependencies for CONFIG_IMG_MANAGER -CONFIG_STREAM_FLASH=y -CONFIG_FLASH_MAP=y - -# Configure dependencies for CONFIG_MCUMGR_TRANSPORT_UART -CONFIG_BASE64=y - -# MCUboot hooks -CONFIG_MCUMGR_MGMT_NOTIFICATION_HOOKS=y - -CONFIG_MCUMGR_SMP_COMMAND_STATUS_HOOKS=y -#CONFIG_MCUMGR_GRP_FS_FILE_ACCESS_HOOK=y - -CONFIG_MCUMGR_GRP_IMG_UPLOAD_CHECK_HOOK=y -CONFIG_MCUMGR_GRP_IMG_STATUS_HOOKS=y -CONFIG_MCUMGR_GRP_OS_RESET_HOOK=y - -#CONFIG_MCUMGR_GRP_SETTINGS_ACCESS_HOOK=y - -CONFIG_SETUP_FUEL_GAUGE=y diff --git a/prj_release.conf b/prj_release.conf index 1adec71c..cc936ca4 100644 --- a/prj_release.conf +++ b/prj_release.conf @@ -1,9 +1,3 @@ -# -# Copyright (c) 2022 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - # nRF5340 Audio CONFIG_NRF5340_AUDIO=y diff --git a/sample.yaml b/sample.yaml deleted file mode 100644 index 7db32333..00000000 --- a/sample.yaml +++ /dev/null @@ -1,25 +0,0 @@ -sample: - name: nRF5340 Audio application - description: LE Audio and Auracast implementation example -common: - integration_platforms: - - openearable_v2/nrf5340/cpuapp - platform_allow: openearable_v2/nrf5340/cpuapp - sysbuild: true - build_only: true - tags: ci_build sysbuild -tests: - applications.nrf5340_audio.default: - extra_args: [] - applications.nrf5340_audio.headset_unicast: - extra_args: FILE_SUFFIX=release CONFIG_AUDIO_DEV=1 - applications.nrf5340_audio.gateway_unicast: - extra_args: FILE_SUFFIX=release CONFIG_AUDIO_DEV=2 - applications.nrf5340_audio.headset_broadcast: - extra_args: FILE_SUFFIX=release CONFIG_AUDIO_DEV=1 CONFIG_TRANSPORT_BIS=y - applications.nrf5340_audio.gateway_broadcast: - extra_args: FILE_SUFFIX=release CONFIG_AUDIO_DEV=2 CONFIG_TRANSPORT_BIS=y - applications.nrf5340_audio.headset_unicast_sd_card: - extra_args: FILE_SUFFIX=release CONFIG_AUDIO_DEV=1 CONFIG_SD_CARD_PLAYBACK=y - applications.nrf5340_audio.headset_dfu: - extra_args: FILE_SUFFIX=release CONFIG_AUDIO_DEV=1 FILE_SUFFIX=fota diff --git a/unicast_server/main.cpp b/src/main.cpp similarity index 56% rename from unicast_server/main.cpp rename to src/main.cpp index ed11507c..4e7d096a 100644 --- a/unicast_server/main.cpp +++ b/src/main.cpp @@ -1,27 +1,30 @@ -/* - * Copyright (c) 2018 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - #include #include #include -#include #include #include - -//#include "../src/modules/sd_card.h" - #include +#include +#include + +#if defined(CONFIG_USB_DEVICE_STACK_NEXT) +#include +#include +extern "C" { +#include +} +#else +#include +#endif #include "macros_common.h" #include "openearable_common.h" #include "streamctrl.h" - -#include "../src/Battery/PowerManager.h" -#include "../src/SensorManager/SensorManager.h" -#include "../src/utils/StateIndicator.h" +#include "uicr.h" +#include "bt_mgmt.h" +#include "bt_mgmt_conn_interval.h" +#include "conn_interval/conn_intvl_linear.h" +#include "time_sync.h" #include "device_info.h" #include "battery_service.h" @@ -32,29 +35,21 @@ #include "SensorScheme.h" #include "DefaultSensors.h" -#include "time_sync.h" +#include "Battery/PowerManager.h" +#include "SensorManager/SensorManager.h" +#include "SD_Card/SD_Card_Manager/SD_Card_Manager.h" +#include "utils/StateIndicator.h" -#include "../src/SD_Card/SDLogger/SDLogger.h" - -#include "uicr.h" - -#include "streamctrl.h" - -#include "bt_mgmt.h" - -#include "bt_mgmt_conn_interval.h" -#include "conn_interval/conn_intvl_linear.h" - -//#include "sd_card.h" - -#include LOG_MODULE_REGISTER(main, CONFIG_MAIN_LOG_LEVEL); -//BUILD_ASSERT(DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_console), zephyr_cdc_acm_uart), -// "Console device is not ACM CDC UART device"); -/* STEP 5.4 - Include header for USB */ -#include +#if defined(CONFIG_USB_DEVICE_STACK_NEXT) +/* Register SD card as a USB Mass Storage LUN */ +USBD_DEFINE_MSC_LUN(sd, "SD", "OpenEarable", "SD Card", "1.00"); +/* Global USB device context, used by SDCardManager to disable/enable USB + * when the firmware needs exclusive SD card access for logging. */ +struct usbd_context *g_usbd; +#endif int main(void) { int ret; @@ -65,21 +60,33 @@ int main(void) { ERR_CHK(ret); uint8_t standalone = uicr_standalone_get(); - LOG_INF("Standalone mode: %i", standalone); - /*sdcard_manager.init(); - - sdcard_manager.mount();*/ - - /* STEP 5.5 - Enable USB */ - if (IS_ENABLED(CONFIG_USB_DEVICE_STACK)) { - ret = usb_enable(NULL); - if (ret) { - LOG_ERR("Failed to enable USB"); - return 0; +#if defined(CONFIG_USB_DEVICE_STACK_NEXT) + { + /* Bring SD rails up (if a card is present) before disk probe and USB + * enable so MSC sees the card on first host poll. */ + sdcard_manager.init(); + ret = disk_access_init("SD"); + LOG_INF("disk_access_init(SD)=%d", ret); + + g_usbd = sample_usbd_init_device(NULL); + if (g_usbd == NULL) { + LOG_ERR("Failed to initialize USB device"); + } else { + ret = usbd_enable(g_usbd); + if (ret) { + LOG_ERR("Failed to enable USB: %d", ret); + } } } +#elif defined(CONFIG_USB_DEVICE_STACK) + ret = usb_enable(NULL); + if (ret) { + LOG_ERR("Failed to enable USB"); + return 0; + } +#endif streamctrl_start(); @@ -95,17 +102,7 @@ int main(void) { init_sensor_manager(); - //sensor_config imu = {ID_IMU, 80, 0}; - //sensor_config imu = {ID_PPG, 400, 0}; - //sensor_config temp = {ID_OPTTEMP, 10, 0}; - // sensor_config temp = {ID_BONE_CONDUCTION, 100, 0}; - - //config_sensor(&temp); - - //sensor_config ppg = {ID_PPG, 400, 0}; - //config_sensor(&ppg); - - ret = init_led_service(); + ret = init_led_service(); ERR_CHK(ret); ret = init_battery_service(); @@ -129,9 +126,5 @@ int main(void) { ret = init_time_sync(); ERR_CHK(ret); - // error test - //long *a = nullptr; - //*a = 10; - return 0; -} \ No newline at end of file +} diff --git a/sysbuild_fota.conf b/sysbuild.conf similarity index 75% rename from sysbuild_fota.conf rename to sysbuild.conf index ac07f63f..3d9dcd43 100644 --- a/sysbuild_fota.conf +++ b/sysbuild.conf @@ -1,9 +1,3 @@ -# -# Copyright (c) 2024 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - # Enable bootloaders for both cores SB_CONFIG_BOOTLOADER_MCUBOOT=y SB_CONFIG_SECURE_BOOT_NETCORE=y diff --git a/sysbuild/mcuboot/app_fota.overlay b/sysbuild/mcuboot/app.overlay similarity index 100% rename from sysbuild/mcuboot/app_fota.overlay rename to sysbuild/mcuboot/app.overlay diff --git a/sysbuild/mcuboot/boards/openearable_v2_nrf5340_cpuapp.overlay b/sysbuild/mcuboot/boards/openearable_v2_nrf5340_cpuapp.overlay new file mode 100644 index 00000000..9516db10 --- /dev/null +++ b/sysbuild/mcuboot/boards/openearable_v2_nrf5340_cpuapp.overlay @@ -0,0 +1,7 @@ +#include "../../../boards/openearable_v2_nrf5340_cpuapp.overlay" + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/sysbuild/mcuboot/boards/openearable_v2_nrf5340_cpuapp_fota.overlay b/sysbuild/mcuboot/boards/openearable_v2_nrf5340_cpuapp_fota.overlay deleted file mode 100644 index 0719884c..00000000 --- a/sysbuild/mcuboot/boards/openearable_v2_nrf5340_cpuapp_fota.overlay +++ /dev/null @@ -1,7 +0,0 @@ -#include "../../../boards/openearable_v2_nrf5340_cpuapp_fota.overlay" - -/ { - chosen { - nordic,pm-ext-flash = &mx25r64; - }; -}; diff --git a/sysbuild/mcuboot/prj_fota.conf b/sysbuild/mcuboot/prj.conf similarity index 100% rename from sysbuild/mcuboot/prj_fota.conf rename to sysbuild/mcuboot/prj.conf diff --git a/tools/flash/flash_fota.ps1 b/tools/flash/flash.ps1 similarity index 97% rename from tools/flash/flash_fota.ps1 rename to tools/flash/flash.ps1 index 8c95421d..7e7b6b0c 100644 --- a/tools/flash/flash_fota.ps1 +++ b/tools/flash/flash.ps1 @@ -72,13 +72,13 @@ if ($Hw) { } # --- Fixed paths relative to CURRENT WORKING DIRECTORY (repo root) --- -$netHex = Join-Path (Get-Location) 'build_fota\merged_CPUNET.hex' -$appHex = Join-Path (Get-Location) 'build_fota\merged.hex' +$netHex = Join-Path (Get-Location) 'build\merged_CPUNET.hex' +$appHex = Join-Path (Get-Location) 'build\merged.hex' $uicrBackup = Join-Path (Get-Location) 'tools\flash\uicr_backup.hex' # --- Require application hex; CPUNET is optional --- if (-not (Test-Path $appHex)) { - Write-Error "Missing file: $appHex (run from the repo root where build_fota\merged.hex exists)" + Write-Error "Missing file: $appHex (run from the repo root where build\merged.hex exists)" exit 1 } $haveNet = Test-Path $netHex diff --git a/tools/flash/flash.sh b/tools/flash/flash.sh index 66b37a14..bb11d153 100755 --- a/tools/flash/flash.sh +++ b/tools/flash/flash.sh @@ -1,13 +1,20 @@ #!/bin/bash # Default parameters -CLOCKSPEED=8000 -CHIP=NRF53 +CLOCKSPEED=4000 +FAMILY=nrf53 + +# Common nrfutil options +NRFUTIL_OPTS="--family $FAMILY" + +# UICR address range for nRF5340 +UICR_ADDR=0x00FF8000 +UICR_SIZE=4096 # Function to show usage show_usage() { - echo "Usage: $0 --snr [--left|--right] [--standalone] [--hw x.y.z]" - echo " --snr: Device serial number (required)" + echo "Usage: $0 [--snr ] [--left|--right] [--standalone] [--hw x.y.z]" + echo " --snr: Device serial number" echo " --left: Flash left earable configuration" echo " --right: Flash right earable configuration" echo " --standalone: Configure device for standalone mode" @@ -29,16 +36,15 @@ while [[ "$#" -gt 0 ]]; do done # Check if SNR is provided -if [ -z "$SNR" ]; then - echo "Error: Serial number (--snr) is required" - show_usage +if [ -n "$SNR" ]; then + # Validate serial number is numeric + if ! [[ "$SNR" =~ ^[0-9]+$ ]]; then + echo "Error: Serial number must be numeric" + exit 1 + fi + NRFUTIL_OPTS="--serial-number $SNR $NRFUTIL_OPTS" fi -# Validate serial number is numeric -if ! [[ "$SNR" =~ ^[0-9]+$ ]]; then - echo "Error: Serial number must be numeric" - exit 1 -fi # Check if --hw is used without --left or --right if [ -n "$HW_VERSION" ] && [ -z "$LEFT" ] && [ -z "$RIGHT" ]; then @@ -74,34 +80,44 @@ if [ -n "$HW_VERSION" ]; then HW_VALUE=$(printf "0x%02X%02X%02X00" $HW_MAJOR $HW_MINOR $HW_PATCH) fi -if [ -z "$LEFT" ] && [ -z "$RIGHT" ]; then - nrfjprog --readuicr ./tools/flash/uicr_backup.hex -f $CHIP --snr $SNR --clockspeed $CLOCKSPEED +# Check if standalone was specified without left/right +if [ "$STANDALONE" == true ] && [ -z "$LEFT" ] && [ -z "$RIGHT" ]; then + echo "Error: --standalone can only be used with --left or --right" + show_usage fi -nrfjprog --program ./build/merged_CPUNET.hex --chiperase --verify -f $CHIP --coprocessor CP_NETWORK --snr $SNR --clockspeed $CLOCKSPEED -nrfjprog --program ./build/merged.hex --chiperase --verify -f $CHIP --coprocessor CP_APPLICATION --snr $SNR --clockspeed $CLOCKSPEED +# First, explicitly recover both cores separately to ensure they are unlocked +nrfutil device recover --core network $NRFUTIL_OPTS +nrfutil device recover --core application $NRFUTIL_OPTS +sleep 1 -if [ -z "$LEFT" ] && [ -z "$RIGHT" ]; then - nrfjprog --program ./tools/flash/uicr_backup.hex -f $CHIP --snr $SNR --clockspeed $CLOCKSPEED --verify -fi +# Flash network core (CPUNET) +nrfutil device program --firmware ./build/merged_CPUNET.hex --core network --options chip_erase_mode=ERASE_ALL,verify=VERIFY_READ $NRFUTIL_OPTS +nrfutil device reset --core network $NRFUTIL_OPTS +sleep 1 + +# Flash application core (CPUAPP) +nrfutil device program --firmware ./build/merged.hex --core application --options verify=VERIFY_READ $NRFUTIL_OPTS +# Set left/right configuration if [ "$LEFT" == true ]; then - nrfjprog --memwr 0x00FF80F4 --val 0 -f $CHIP --snr $SNR --clockspeed $CLOCKSPEED + nrfutil device write --address 0x00FF80F4 --value 0 $NRFUTIL_OPTS elif [ "$RIGHT" == true ]; then - nrfjprog --memwr 0x00FF80F4 --val 1 -f $CHIP --snr $SNR --clockspeed $CLOCKSPEED + nrfutil device write --address 0x00FF80F4 --value 1 $NRFUTIL_OPTS fi # Set standalone mode configuration if requested if [ "$STANDALONE" == true ]; then - nrfjprog --memwr 0x00FF80FC --val 0 -f $CHIP --snr $SNR --clockspeed $CLOCKSPEED + nrfutil device write --address 0x00FF80FC --value 0 $NRFUTIL_OPTS echo "Device configured for standalone mode" fi # Set hardware version if provided if [ -n "$HW_VERSION" ]; then - nrfjprog --memwr 0x00FF8100 --val $HW_VALUE -f $CHIP --snr $SNR --clockspeed $CLOCKSPEED + nrfutil device write --address 0x00FF8100 --value $HW_VALUE $NRFUTIL_OPTS echo "Hardware version set to $HW_VERSION" fi -nrfjprog --reset -f $CHIP --snr $SNR --clockspeed $CLOCKSPEED +# Reset device +nrfutil device reset --core application $NRFUTIL_OPTS diff --git a/tools/flash/flash_fota.sh b/tools/flash/flash_fota.sh deleted file mode 100755 index 9cdfaed9..00000000 --- a/tools/flash/flash_fota.sh +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/bash - -# Default parameters -CLOCKSPEED=8000 -CHIP=NRF53 - -# Function to show usage -show_usage() { - echo "Usage: $0 --snr [--left|--right] [--standalone] [--hw x.y.z]" - echo " --snr: Device serial number (required)" - echo " --left: Flash left earable configuration" - echo " --right: Flash right earable configuration" - echo " --standalone: Configure device for standalone mode" - echo " --hw: Set hardware version (format: x.y.z, e.g., 2.0.0)" - exit 1 -} - -# Parse arguments -while [[ "$#" -gt 0 ]]; do - case $1 in - --snr) SNR="$2"; shift ;; - --left) LEFT=true ;; - --right) RIGHT=true ;; - --standalone) STANDALONE=true ;; - --hw) HW_VERSION="$2"; shift ;; - *) show_usage ;; - esac - shift -done - -# Check if SNR is provided -if [ -z "$SNR" ]; then - echo "Error: Serial number (--snr) is required" - show_usage -fi - -# Validate serial number is numeric -if ! [[ "$SNR" =~ ^[0-9]+$ ]]; then - echo "Error: Serial number must be numeric" - exit 1 -fi - -# Check if --hw is used without --left or --right -if [ -n "$HW_VERSION" ] && [ -z "$LEFT" ] && [ -z "$RIGHT" ]; then - echo "Error: --hw can only be used with --left or --right" - show_usage -fi - -# Set default hardware version if --left or --right is specified without --hw -if [ -n "$LEFT" ] || [ -n "$RIGHT" ]; then - if [ -z "$HW_VERSION" ]; then - HW_VERSION="2.0.0" - echo "No hardware version specified, using default: $HW_VERSION" - fi -fi - -# Validate hardware version format if provided -if [ -n "$HW_VERSION" ]; then - if ! [[ "$HW_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "Error: Hardware version must be in format x.y.z (e.g., 2.0.0)" - exit 1 - fi - - # Extract version components - IFS='.' read -r HW_MAJOR HW_MINOR HW_PATCH <<< "$HW_VERSION" - - # Validate each component is within uint8_t range (0-255) - if [ "$HW_MAJOR" -gt 255 ] || [ "$HW_MINOR" -gt 255 ] || [ "$HW_PATCH" -gt 255 ]; then - echo "Error: Each version component must be between 0 and 255" - exit 1 - fi - - # Calculate uint32_t value: (major << 16) | (minor << 8) | patch - HW_VALUE=$(printf "0x%02X%02X%02X00" $HW_MAJOR $HW_MINOR $HW_PATCH) -fi - -# Check if standalone was specified without left/right -if [ "$STANDALONE" == true ] && [ -z "$LEFT" ] && [ -z "$RIGHT" ]; then - echo "Error: --standalone can only be used with --left or --right" - show_usage -fi - -# Backup UICR if neither left nor right is specified -if [ -z "$LEFT" ] && [ -z "$RIGHT" ]; then - nrfjprog --readuicr ./tools/flash/uicr_backup.hex -f $CHIP --snr $SNR --clockspeed $CLOCKSPEED -fi - -# Flash network core (CPUNET) -nrfjprog --program ./build_fota/merged_CPUNET.hex --chiperase --verify -f $CHIP --coprocessor CP_NETWORK --snr $SNR --clockspeed $CLOCKSPEED - -# Flash application core (CPUAPP) -nrfjprog --program ./build_fota/merged.hex --chiperase --verify -f $CHIP --coprocessor CP_APPLICATION --snr $SNR --clockspeed $CLOCKSPEED - -# Restore UICR if neither left nor right is specified -if [ -z "$LEFT" ] && [ -z "$RIGHT" ]; then - nrfjprog --program ./tools/flash/uicr_backup.hex -f $CHIP --snr $SNR --clockspeed $CLOCKSPEED --verify -fi - -# Set left/right configuration -if [ "$LEFT" == true ]; then - nrfjprog --memwr 0x00FF80F4 --val 0 -f $CHIP --snr $SNR --clockspeed $CLOCKSPEED -elif [ "$RIGHT" == true ]; then - nrfjprog --memwr 0x00FF80F4 --val 1 -f $CHIP --snr $SNR --clockspeed $CLOCKSPEED -fi - -# Set standalone mode configuration if requested -if [ "$STANDALONE" == true ]; then - nrfjprog --memwr 0x00FF80FC --val 0 -f $CHIP --snr $SNR --clockspeed $CLOCKSPEED - echo "Device configured for standalone mode" -fi - -# Set hardware version if provided -if [ -n "$HW_VERSION" ]; then - nrfjprog --memwr 0x00FF8100 --val $HW_VALUE -f $CHIP --snr $SNR --clockspeed $CLOCKSPEED - echo "Hardware version set to $HW_VERSION" -fi - -# Reset device -nrfjprog --reset -f $CHIP --snr $SNR --clockspeed $CLOCKSPEED diff --git a/tools/flash/mcu-manager_upload.sh b/tools/flash/mcu-manager_upload.sh new file mode 100755 index 00000000..f8f3212d --- /dev/null +++ b/tools/flash/mcu-manager_upload.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +MGR_CMD="nrfutil mcu-manager serial --serial-port port=/dev/ttyACM0,baud_rate=57600" + +HASH_APP="$(sha256sum build/open-earable-2/zephyr/zephyr.signed.bin | cut -d' ' -f1)" +HASH_NET="$(sha256sum build/signed_by_mcuboot_and_b0_ipc_radio.bin | cut -d' ' -f1)" +echo "Hash APP: $HASH_APP" +echo "Hash NET: $HASH_NET" + +echo "Current images:" +$MGR_CMD image-list + +# BEST OPTION! +#$MGR_CMD image-upload --firmware build/dfu_application.zip --mtu 256 + +# I think I can only upload the app image? +$MGR_CMD image-erase +$MGR_CMD image-upload --firmware build/open-earable-2/zephyr/zephyr.signed.bin --mtu 128 +$MGR_CMD image-test --hash $HASH_APP && $MGR_CMD image-confirm + +#$MGR_CMD image-upload --firmware build/signed_by_mcuboot_and_b0_ipc_radio.bin --image-number 1 +#$MGR_CMD image-test --hash $HASH_NET && $MGR_CMD image-confirm + +echo "Resetting device..." + +$MGR_CMD reset \ No newline at end of file diff --git a/tools/flash/mcumgr_upload.sh b/tools/flash/mcumgr_upload.sh deleted file mode 100755 index 3e12219c..00000000 --- a/tools/flash/mcumgr_upload.sh +++ /dev/null @@ -1,18 +0,0 @@ -mcumgr conn add acm0 type="serial" connstring="dev=/dev/tty.usbmodem11101,baud=115200,mtu=512" - -# mcumgr -c acm0 image list - -mcumgr -c acm0 image upload -e -n 0 build_fota/open-earable-v2/zephyr/zephyr.signed.bin -mcumgr -c acm0 image upload -e -n 1 build_fota/signed_by_mcuboot_and_b0_ipc_radio.bin - -# Get hashes from image list -HASH_APP=$(mcumgr -c acm0 image list | grep "hash: " | sed -n 2p | cut -d" " -f6) -HASH_NET=$(mcumgr -c acm0 image list | grep "hash: " | sed -n 3p | cut -d" " -f6) - -# Test both images with their hashes -mcumgr -c acm0 image test $HASH_APP > /dev/null 2>&1 -mcumgr -c acm0 image test $HASH_NET - -echo "Resetting device..." - -mcumgr -c acm0 reset \ No newline at end of file diff --git a/tools/flash/recover.sh b/tools/flash/recover.sh index fe45c7a5..52145df9 100755 --- a/tools/flash/recover.sh +++ b/tools/flash/recover.sh @@ -28,6 +28,8 @@ if ! [[ "$SNR" =~ ^[0-9]+$ ]]; then exit 1 fi +CLOCK_SPEED=4000 + # Recover both network and application processors -nrfjprog --recover -f NRF53 --coprocessor CP_NETWORK --snr $SNR --clockspeed 8000 -nrfjprog --recover -f NRF53 --coprocessor CP_APPLICATION --snr $SNR --clockspeed 8000 +nrfutil device recover --serial-number $SNR --family nrf53 --core network --swd-clock-frequency $CLOCK_SPEED +nrfutil device recover --serial-number $SNR --family nrf53 --core application --swd-clock-frequency $CLOCK_SPEED diff --git a/unicast_server/CMakeLists.txt b/unicast_server/CMakeLists.txt deleted file mode 100644 index e5a6f6c0..00000000 --- a/unicast_server/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (c) 2023 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -target_sources(app PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp) diff --git a/unicast_server/Kconfig.defaults b/unicast_server/Kconfig.defaults deleted file mode 100644 index 0cedd4a6..00000000 --- a/unicast_server/Kconfig.defaults +++ /dev/null @@ -1,116 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -config AUDIO_DEV - default 1 - -config BT_GATT_AUTO_DISCOVER_CCC - default y - -config BT_GATT_AUTO_RESUBSCRIBE - default n - -config BT_GATT_AUTO_SEC_REQ - default n - -config BT_GATT_AUTO_UPDATE_MTU - default y - -config BT_GATT_CACHING - default n - -config BT_GATT_CLIENT - default y - -config BT_GATT_DYNAMIC_DB - default y - -config BT_MAX_CONN - default 4 - -config BT_MAX_PAIRED - default 4 - -config BT_EXT_ADV - default y - -config BT_AUDIO - default y - -config BT_PERIPHERAL - default y - -config BT_ISO_PERIPHERAL - default y - -config BT_BAP_UNICAST_SERVER - default y - -config BT_CAP_ACCEPTOR - default y - -config BT_CAP_ACCEPTOR_SET_MEMBER - default y - -config BT_PAC_SNK - default y - -config BT_PAC_SNK_NOTIFIABLE - default y - -config BT_PAC_SRC - default y - -config BT_PAC_SRC_NOTIFIABLE - default y - -config BT_CSIP_SET_MEMBER - default y - -config BT_DEVICE_APPEARANCE - default 2369 - -config BT_ISO_MAX_CHAN - default 2 - -config BT_ASCS - default y - -config BT_ASCS_MAX_ASE_SNK_COUNT - default 1 - -config BT_ASCS_MAX_ASE_SRC_COUNT - default 1 - -config BT_VCP_VOL_REND - default y - -config BT_MCC - default y - -config BT_MCC_READ_MEDIA_STATE - default y - -config BT_MCC_SET_MEDIA_CONTROL_POINT - default y - -config BT_GAP_PERIPHERAL_PREF_PARAMS - default n - -config BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE - default 25 - -config LC3_ENC_CHAN_MAX - default 1 - -config LC3_DEC_CHAN_MAX - default 1 - -config MBEDTLS_ENABLE_HEAP - default y - -config MBEDTLS_HEAP_SIZE - default 2048 diff --git a/unicast_server/README.rst b/unicast_server/README.rst deleted file mode 100644 index 4b253de2..00000000 --- a/unicast_server/README.rst +++ /dev/null @@ -1,150 +0,0 @@ -.. _nrf53_audio_unicast_server_app: - -nRF5340 Audio: Unicast server -############################# - -.. contents:: - :local: - :depth: 2 - -The nRF5340 Audio unicast server application implements the :ref:`CIS headset mode `. - -In this mode, one Connected Isochronous Group (CIG) can be used with two Connected Isochronous Streams (CIS). -Receiving unidirectional or transceiving bidirectional audio happens using CIG and CIS. -In addition, Coordinated Set Identification Service (CSIS) is implemented on the server side. - -The following limitations apply to this application: - -* One CIG, one of the two CIS streams (selectable). -* Audio output: I2S/Analog headset output. -* Audio input: PDM microphone over I2S. -* Configuration: 16 bit, several bit rates ranging from 32 kbps to 124 kbps. - -.. _nrf53_audio_unicast_server_app_requirements: - -Requirements -************ - -The application shares the :ref:`requirements common to all nRF5340 Audio application `. - -.. _nrf53_audio_unicast_server_app_ui: - -User interface -************** - -Most of the user interface mappings are common across all nRF5340 Audio applications. -See the :ref:`nrf53_audio_app_ui` page for detailed overview. - -This application uses specific mapping for the following user interface elements: - -* Long-pressed on the unicast server device during startup: - - * **VOL-** - Changes the headset to the left channel one. - * **VOL+** - Changes the headset to the right channel one. - * **BTN5** - Clears the previously stored bonding information. - -* Pressed on the unicast server device during playback: - - * **PLAY/PAUSE** - Starts or pauses the playback of the stream. - * **VOL-** - Turns the playback volume down. - * **VOL+** - Turns the playback volume up. - * **BTN5** - Mutes the playback volume (and unmutes). - -* **LED1** - Blinking blue - Kits have started streaming audio. -* **LED2** - Solid green - Sync achieved (both drift and presentation compensation are in the ``LOCKED`` state). -* **RGB**: - - * Solid blue - The device is programmed as the left headset. - * Solid magenta - The device is programmed as the right headset. - -.. _nrf53_audio_unicast_server_app_configuration: - -Configuration -************* - -By default, if you have not made any changes to :file:`.conf` files at :file:`applications/nrf5340_audio/`, the nRF5340 build script tries to build the CIS applications in the CIS unidirectional mode. -To switch to the bidirectional mode, see :ref:`nrf53_audio_app_configuration_select_bidirectional`. - -For other configuration options, see :ref:`nrf53_audio_app_configuration` and :ref:`nrf53_audio_app_fota`. - -For information about how to configure applications in the |NCS|, see :ref:`configure_application`. - -.. _nrf53_audio_unicast_server_app_building: - -Building and running -******************** - -This application can be found under :file:`applications/nrf5340_audio/unicast_server` in the nRF Connect SDK folder structure, but it uses :file:`.conf` files at :file:`applications/nrf5340_audio/`. - -The nRF5340 Audio DK comes preprogrammed with basic firmware that indicates if the kit is functional. -See :ref:`nrf53_audio_app_dk_testing_out_of_the_box` for more information. - -To build the application, see :ref:`nrf53_audio_app_building`. - -.. _nrf53_audio_unicast_server_app_testing: - -Testing -******* - -After building and programming the application, you can test the default CIS headset mode using one :ref:`unicast client application ` and one or two unicast server devices (this application). -The recommended approach is to use two other nRF5340 Audio DKs programmed with the :ref:`unicast client application ` for the CIS gateway and the unicast server application (this application) for the CIS headset, respectively, but you can also use an external device that supports the role of unicast server. - -.. note:: - |nrf5340_audio_external_devices_note| - -The following testing scenario assumes you are using USB as the audio source on the gateway. -This is the default setting. - -Complete the following steps to test the unidirectional CIS mode for one gateway and two headset devices: - -1. Make sure that the development kits are still plugged into the USB ports and are turned on. - - .. note:: - |usb_known_issues| - - **LED3** starts blinking green on every device to indicate the ongoing CPU activity on the application core. -#. Wait for the **LED1** on the gateway to start blinking blue. - This happens shortly after programming the development kit and indicates that the gateway device is connected to at least one headset and ready to send data. -#. Search the list of audio devices listed in the sound settings of your operating system for *nRF5340 USB Audio* (gateway) and select it as the output device. -#. Connect headphones to the **HEADPHONE** audio jack on both headset devices. -#. Start audio playback on your PC from any source. -#. Wait for **LED1** to blink blue on the headset. - When they do, the audio stream has started on the headset. - - .. note:: - The audio outputs only to the left channel of the audio jack, even if the given headset is configured as the right headset. - This is because of the mono hardware codec chip used on the development kits. - If you want to play stereo sound using one development kit, you must connect an external hardware codec chip that supports stereo. - -#. Wait for **LED2** to light up solid green on the headsets to indicate that the audio synchronization is achieved. -#. Press the **VOL+** button on one of the headsets. - The playback volume increases for the headset. -#. If you use more than one headset, hold down the **VOL+** button and press the **RESET** button on a headset. - After startup, this headset will be configured as the right channel headset. -#. If you use more than one headset, hold down the **VOL-** button and press the **RESET** button on a headset. - After startup, this headset will be configured as the left channel headset. - You can also just press the **RESET** button to restore the original programmed settings. - -For other testing options, refer to :ref:`nrf53_audio_unicast_server_app_ui`. - -After the kits have paired for the first time, they are now bonded. -This means the Long-Term Key (LTK) is stored on each side, and that the kits will only connect to each other unless the bonding information is cleared. -To clear the bonding information, press and hold **BTN 5** during boot or reprogram all the development kits. - -When you finish testing, power off the nRF5340 Audio development kits by switching the power switch from On to Off. - -.. _nrf53_audio_unicast_server_app_testing_steps_cis_walkie_talkie: - -Testing the walkie-talkie demo -============================== - -Testing the walkie-talkie demo is identical to the default testing procedure, except for the following differences: - -* You must enable the Kconfig option mentioned in :ref:`nrf53_audio_app_configuration_enable_walkie_talkie` before building the application. -* Instead of controlling the playback, you can speak through the PDM microphones. - The line is open all the time, no need to press any buttons to talk, but the volume control works as in the default testing procedure. - -Dependencies -************ - -For the list of dependencies, check the application's source files. diff --git a/unicast_server/overlay-unicast_server.conf b/unicast_server/overlay-unicast_server.conf deleted file mode 100644 index dac80b13..00000000 --- a/unicast_server/overlay-unicast_server.conf +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (c) 2025 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -CONFIG_AUDIO_DEV=1 - -CONFIG_BT_GATT_AUTO_DISCOVER_CCC=y -CONFIG_BT_GATT_AUTO_RESUBSCRIBE=n -CONFIG_BT_GATT_AUTO_SEC_REQ=n -CONFIG_BT_GATT_AUTO_UPDATE_MTU=y -CONFIG_BT_GATT_CACHING=n -CONFIG_BT_GATT_CLIENT=y -CONFIG_BT_GATT_DYNAMIC_DB=y - -CONFIG_BT_MAX_CONN=4 -CONFIG_BT_MAX_PAIRED=4 -CONFIG_BT_EXT_ADV=y - -CONFIG_BT_AUDIO=y - -CONFIG_BT_PERIPHERAL=y -CONFIG_BT_ISO_PERIPHERAL=y -CONFIG_BT_BAP_UNICAST_SERVER=y -CONFIG_BT_CAP_ACCEPTOR=y -CONFIG_BT_CAP_ACCEPTOR_SET_MEMBER=y -CONFIG_BT_PAC_SNK=y -CONFIG_BT_PAC_SNK_NOTIFIABLE=y -CONFIG_BT_PAC_SRC=y -CONFIG_BT_PAC_SRC_NOTIFIABLE=y -CONFIG_BT_CSIP_SET_MEMBER=y -CONFIG_BT_DEVICE_APPEARANCE=2369 - -CONFIG_BT_ISO_MAX_CHAN=2 -CONFIG_BT_ASCS=y -CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT=1 -CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT=1 -CONFIG_BT_VCP_VOL_REND=y -CONFIG_BT_MCC=y -CONFIG_BT_MCC_READ_MEDIA_STATE=y -CONFIG_BT_MCC_SET_MEDIA_CONTROL_POINT=y -CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=n -CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE=25 - -CONFIG_LC3_ENC_CHAN_MAX=1 -CONFIG_LC3_DEC_CHAN_MAX=1 -CONFIG_MBEDTLS_ENABLE_HEAP=y -CONFIG_MBEDTLS_HEAP_SIZE=2048