Adapting nRF5340 Audio applications for end products
This page describes the relevant configuration sources and lists the steps required for adapting the nRF5340 Audio applications to end products.
The nRF5340 Audio applications use the following files as board configuration sources:
Devicetree Specification (DTS) files - These reflect the hardware configuration. See Devicetree Guide for more information about the DTS data structure.
Kconfig files - These reflect the hardware-related software configuration. See Kconfig - Tips and Best Practices for information about how to configure them.
Memory layout configuration files - These define the memory layout of the application.
You can see the
zephyr/boards/arm/nrf5340_audio_dk_nrf5340 directory as an example of how these files are structured.
The application configuration source file defines a set of options used by the given nRF5340 Audio application.
This is a
.conf file that modifies the default Kconfig values defined in the Kconfig files.
.conf file is included at a time.
prj.conf file is the default configuration file and it implements the debug application version.
For the release application version, you need to include the
prj_release.conf configuration file.
In the release application version no debug features should be enabled.
Each nRF5340 Audio application also uses its own
Kconfig.default file to change configuration defaults automatically.
You need to edit
prj_release.conf if you want to add new functionalities to your application, but editing these files when adding a new board is not required.
The first three steps of the configuration procedure are identical to the steps described in Zephyr’s Board Porting Guide.
To use the nRF5340 Audio application with your custom board:
Define the board files for your custom board:
Create a new directory in the
nrf/boards/arm/directory with the name of the new board.
Copy the nRF5340 Audio board files from the
nrf5340_audio_dk_nrf5340directory located in the
zephyr/boards/arm/folder to the newly created directory.
Edit the DTS files to make sure they match the hardware configuration. Pay attention to the following elements:
Pins that are used.
Interrupt priority that might be different.
Edit the board’s Kconfig files to make sure they match the required system configuration. For example, disable the drivers that will not be used by your device.
Build the application by selecting the name of the new board (for example,
new_audio_board_name) in your build system. For example, when building from the command line, add
-b new_audio_board_nameto your build command.
To create your own app that supports DFU, you can use the nRF Connect Device Manager libraries for Android and iOS.
Given the requirements for the Coordinated Set Identification Service (CSIS), make sure to change the Set Identity Resolving Key (SIRK) value when adapting the application.