Including the nRF 802.15.4 Radio Driver in a project
You can include the nRF 802.15.4 Radio Driver in your project using either CMake or other build systems.
Using CMake
The nRF 802.15.4 Radio Driver supports the CMake build system and can be directly included in a project using the CMake build system with the add_subdirectory(nrfxlib/nrf_802154) CMake command.
If building on a single core SoC, you should then do the following:
Link the following libraries (CMake targets) to the application library:
nrf-802154-drivernrf-802154-slnrf-802154-driver-interface
Create another library named
nrf-802154-platform. This library should contain implementations of all the functions declared in the include files in the directories:nrfxlib/nrf_802154/driver/include/platformnrfxlib/nrf_802154/sl/include/platform
To resolve circular dependencies, link the
nrf-802154-sllibrary to thenrf-802154-platformlibrary using thePRIVATEscope.Either set the appropriate
NRF_802154_..._RADIO_IRQ_HANDLINGcompilation defines to1or the appropriate ISRs must call the handlers declared innrf_802154_irq_handlers.h.
If building on a multicore SoC, you can follow two approaches:
You can build the entire application on the core controlling the RADIO peripheral. In this case, follow the same building process as for a single core SoC.
The application core is running the application, while the radio core is running the 802.15.4 driver (this must be the core controlling the RADIO peripheral). The application core calls functions of the radio core via a serialization layer.
In the second scenario, you must do the following:
Follow the steps described for the single core application only for the radio core.
Link for both cores the following libraries:
nrf-802154-serializationnrf-802154-serialization-interface
Add to the
nrf-802154-platformlibrary for both cores the implementations of all the functions declared in the include files in thenrfxlib/nrf_802154/serialization/include/platformdirectory.
Using other build systems
To add the 802.15.4 radio driver to a project using other build systems, create build system scripts listing all the necessary 802.15.4 radio driver files to build. The lists of the necessary files can be found in the following locations:
nrfxlib/nrf_802154/common/CMakeLists.txtnrfxlib/nrf_802154/driver/CMakeLists.txtnrfxlib/nrf_802154/serialization/CMakeLists.txtnrfxlib/nrf_802154/sl/sl/CMakeLists.txt
Additionally, you must add all the function implementations which are added to the nrf-802154-platform library when building with CMake.