nRF9160: HTTP modem delta update
The HTTP modem delta update sample demonstrates how to do a delta update of the modem firmware. A delta update is an update that contains only the code that has changed, not the entire firmware.
The sample uses the FOTA download library to download a file from a remote server and write it to the modem.
Requirements
The sample supports the following development kit:
Hardware platforms |
PCA |
Board name |
Build target |
---|---|---|---|
PCA10090 |
|
When built for an _ns
build target, the sample is configured to compile and run as a non-secure application with Cortex-M Security Extensions enabled.
Therefore, it automatically includes Trusted Firmware-M that prepares the required peripherals and secure services to be available for the application.
Overview
The sample connects to an HTTP server to download a signed modem delta image. The delta images are part of the official modem firmware releases. The sample automatically downloads the correct delta image to go from the base version to the test version, or the test version to the base version, depending on the currently installed version.
Building and running
This sample can be found under samples/nrf9160/http_update/modem_delta_update
in the nRF Connect SDK folder structure.
When built as firmware image for the _ns
build target, the sample has Cortex-M Security Extensions (CMSE) enabled and separates the firmware between Non-Secure Processing Environment (NSPE) and Secure Processing Environment (SPE).
Because of this, it automatically includes the Trusted Firmware-M (TF-M).
To read more about CMSE, see Processing environments.
To build the sample with Visual Studio Code, follow the steps listed on the How to build an application page in the nRF Connect for VS Code extension documentation. See Building and programming an application for other building and programming scenarios and Testing and debugging an application for general information about testing and debugging in the nRF Connect SDK.
Testing
After programming the sample to your development kit,, test it by performing the following steps:
Note the LED pattern (1 or 2 LEDs).
Press Button 1 on the nRF9160 DK or type “download” in the terminal emulator to start the download process of the delta to the alternative firmware version.
Once the download has been completed, follow the reboot instructions printed to the UART console.
Observe that the LED pattern has changed (1 vs 2).
Start over from point 1, to perform the delta update back to the previous version.
Dependencies
This sample uses the following nRF Connect SDK libraries:
It uses the following sdk-nrfxlib library:
It uses the following Zephyr libraries:
In addition, it uses the following secure firmware component: