Skip to content

Commit

Permalink
samples: cellular: http_update: remove application reboot
Browse files Browse the repository at this point in the history
* With changes to the modem firmware and integration it is not
  necessary to reboot the application to perform a modem firmware
  update. This commit refactors the full and delta modem firmware update
  samples to only reinitialize the modem and modem library when
  performing the update.
* With changes to full and delta modem firmware update samples, this
  was the only sample using the common folder so this is merged into the
  application. Restructure the sample to align with the modem firmware
  update samples.

Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
  • Loading branch information
eivindj-nordic committed Oct 12, 2023
1 parent 3897787 commit 90eada8
Show file tree
Hide file tree
Showing 35 changed files with 1,567 additions and 716 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ You can hardcode the information in the application, or you can use a functional
Samples and applications implementing FOTA
------------------------------------------

* :ref:`http_full_modem_update_sample` sample - performs a full firmware OTA update of the modem.
* :ref:`http_modem_full_update_sample` sample - performs a full firmware OTA update of the modem.
* :ref:`http_modem_delta_update_sample` sample - performs a delta OTA update of the modem firmware.
* :ref:`http_application_update_sample` sample - performs a basic application FOTA update.
* :ref:`aws_iot` sample - performs a FOTA update using MQTT and HTTP, where the firmware download is triggered through an AWS IoT job.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ nRF9160

* :ref:`asset_tracker_v2` application, which is a low-power asset tracking example for nRF9160 DK and Thingy:91.
* :ref:`fmfu_smp_svr_sample` sample, which shows how to add the full modem serial update functionality to an application using SMP Server.
* :ref:`http_full_modem_update_sample` sample, which demonstrates how to add full modem upgrade support to an application. Note that this requires an external flash memory of a minimum of 2 MB to work, hence the sample will only work on the nRF9160 DK v0.14.0 or later.
* :ref:`http_modem_full_update_sample` sample, which demonstrates how to add full modem upgrade support to an application. Note that this requires an external flash memory of a minimum of 2 MB to work, hence the sample will only work on the nRF9160 DK v0.14.0 or later.
* :ref:`http_modem_delta_update_sample` sample, which demonstrates how to add delta modem upgrade support to an application.
* :ref:`lib_fmfu_mgmt`, which is a new library that implements parts of the mcumgr management protocol for doing full modem serial updates.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ In addition to documentation related to the changes listed above, the following

* nRF9160 samples:

* :ref:`http_full_modem_update_sample` - Updated with the description of its customization options for firmware files.
* :ref:`http_modem_full_update_sample` - Updated with the description of its customization options for firmware files.

* :ref:`zigbee_samples`:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ Multicore samples
nRF9160 samples
---------------

* :ref:`http_full_modem_update_sample` sample:
* :ref:`http_modem_full_update_sample` sample:

* The sample now uses modem firmware versions 1.3.3 and 1.3.4.
* Enabled external flash in the nRF9160 DK devicetree overlays for v0.14.0 or later versions, as it is now disabled in the Zephyr board definition.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ Cellular samples (renamed from nRF9160 samples)

* Updated credentials for the HTTPS connection.

* :ref:`http_full_modem_update_sample` sample:
* :ref:`http_modem_full_update_sample` sample:

* Updated credentials for the HTTPS connection.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ project(application_update)

# NORDIC SDK APP START
target_sources(app PRIVATE src/main.c)
target_sources(app PRIVATE ../common/src/update.c)
target_include_directories(app PRIVATE ../common/include)
# NORDIC SDK APP END
10 changes: 5 additions & 5 deletions samples/cellular/http_update/application_update/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ It uses the :ref:`lib_fota_download` library to download two image files from a
Requirements
************

The sample supports the following development kit:
The sample supports the following development kits:

.. table-from-sample-yaml::

Expand Down Expand Up @@ -111,7 +111,7 @@ After programming the sample to your development kit, test it by performing the
Remember to rename the file to match the ``CONFIG_DOWNLOAD_FILE_V1`` configuration option.
#. Configure the application image version to be 2 and rebuild the application.
#. Upload the file :file:`app_update.bin` with the application image version 2 to the server you have chosen.
#. Reset your nRF9160 DK to start the application.
#. Reset your nRF91 Series DK to start the application.
#. Open a terminal emulator and observe that an output similar to the following is printed:

.. code-block::
Expand All @@ -120,9 +120,9 @@ After programming the sample to your development kit, test it by performing the
#. Observe that **LED 1** is lit.
This indicates that version 1 of the application is running.
#. Press **Button 1** on the nRF9160 DK or type "download" in the terminal emulator to start the download process, and wait until ``Download complete`` is printed in the terminal.
#. Press the **RESET** button on the kit or type "reset" in the terminal emulator.
MCUboot will now detect the downloaded image and program it to flash memory.
#. Press **Button 1** on the nRF91 Series DK or type "download" in the terminal emulator to start the download process, and wait until ``Download complete`` is printed in the terminal.
#. Press **Button 1** on the nRF91 Series DK or type "apply" in the terminal emulator to reboot and apply the update.
MCUboot now detects the downloaded image and program it to flash memory.
This can take up to a minute.
Nothing is printed in the terminal while the writing is in progress.
#. Observe that **LED 1** and **LED 2** are lit.
Expand Down
6 changes: 4 additions & 2 deletions samples/cellular/http_update/application_update/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ tests:
build_only: true
integration_platforms:
- nrf9160dk_nrf9160_ns
platform_allow: nrf9160dk_nrf9160_ns
- nrf9161dk_nrf9161_ns
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns
tags: ci_build
sample.cellular.http_update.application_update.lwm2m_carrier:
build_only: true
extra_args: OVERLAY_CONFIG=overlay-carrier.conf
platform_allow: nrf9160dk_nrf9160_ns
integration_platforms:
- nrf9160dk_nrf9160_ns
- nrf9161dk_nrf9161_ns
platform_allow: nrf9160dk_nrf9160_ns nrf9161dk_nrf9161_ns
tags: ci_build
Loading

0 comments on commit 90eada8

Please sign in to comment.