nRF SDK Fork
NimbeLink provides a "forked" version of the nRF SDK repository, which is modified to support operation on the Skywire Nano. The changes revolve mostly around not using the Nordic Secure Partition Manager (SPM) or BSD library. The operations performed by both are done in the "stack" firmware.
Some nRF SDK libraries have dependencies on the BSD library. The NimbeLink fork modifies these dependencies to still allow the libraries to be used. Instead of using BSD library functions directly, the libraries will invoke Secure Services, which will be handled by the stack.
To configure the nRF SDK to use these APIs, you can select the "offload" variants.
Secure Partition Manager (SPM)
- CONFIG_SPM=n
The nRF SDK SPM module attempts to configure software partitions for projects with multiple images being built at the same time, such as an initial boot loader, a second-stage boot loader, a Secure "partition manager" firmware image, and a Non-Secure application firmware image. For the Skywire Nano, the only firmware image needed is the final application. The build system's use of Kconfig, CMake, and Devicetree fulfill all application linking requirements, and thus the SPM module is not needed.
BSD Library
- CONFIG_BSD_LIBRARY=n
The nRF SDK BSD library uses low-level communication protocols to interact with the nRF9160's co-processor firmware. These accesses require having Secure permissions, however, which applications lack. Thus, any BSD library functionality -- sockets, AT commands, etc. -- will need to be redirected to run through the stack via Secure Services.
Missing BSDLIB Functions
Some nRF SDK sample projects include manually invoking the bsdlib_init()
API.
If you are seeing errors related to that function being missing, it's
recommended to remove the call to it.
If you prefer to not change existing source code in the samples, you can provide an empty implementation of the API to satisfy the linker. When using C, add to a project source file:
int bsdlib_init(void)
{
return 0;
}
When using C++, add to a project source file:
extern "C"
{
int bsdlib_init(void)
{
return 0;
}
}
Note that the sample projects are invoking the API from C, and thus the API must be C-linkable when provided in a C++ source file.
Clock Control
- CONFIG_CLOCK_CONTROL=n
- CONFIG_CLOCK_CONTROL_NRF=n
Similar to the SPM and BSD library, the stack will handle setting up the device hardware, including its clocks. Applications will not have the ability to adjust clock settings, and thus must disable clock control configurations.
FOTA Download
- CONFIG_FOTA_DOWNLOAD_OFFLOAD=y
This configuration allows selecting the NimbeLink fota_download library implementation. Using the OFFLOAD variant will redirect fota_download APIs to the stack via Secure Services.
AT Cmd
- CONFIG_AT_CMD_OFFLOAD=y
This configuration allows selecting the NimbeLink at_cmd library implementation. Using the OFFLOAD variant will redirect at_cmd APIs to the stack via Secure Services.