Skip to content

Commit

Permalink
Restyled by prettier-markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits committed Jul 16, 2022
1 parent 7710aba commit 57e60e5
Showing 1 changed file with 40 additions and 32 deletions.
72 changes: 40 additions & 32 deletions docs/guides/silabs_efr32_software_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ all of the EFR32 example applications.
```

- Build or download the Gecko Bootloader binary. Follow the instructions in
"UG266: Silicon Labs Gecko Bootloader User’s Guide". For the bootloader using the
external flash select the "external SPI" bootloader type configured with a
single slot of at least 1000 KB. For the bootloader using the internal flash
see the Internal Storage Bootloader section below. Pre-built binaries for some
configurations should be available in
"UG266: Silicon Labs Gecko Bootloader User’s Guide". For the bootloader
using the external flash select the "external SPI" bootloader type
configured with a single slot of at least 1000 KB. For the bootloader using
the internal flash see the Internal Storage Bootloader section below.
Pre-built binaries for some configurations should be available in

```
third_party/silabs/matter_support/matter/efr32/bootloader_binaries
Expand Down Expand Up @@ -84,43 +84,51 @@ where operationalDataset is obtained from the OpenThread Border Router.

## Internal Storage Bootloader

Internal storage bootloader for Matter OTA software update is supported on MG24 boards
only. In this use case both the running image and the downloadable update image must fit
on the internal flash at the same time. This in turn requires that both images are built
with a reduced feature set such as disabled logging and Matter shell. The following set of
compile flags leaves out all the optional features and results in the minimal image size:
Internal storage bootloader for Matter OTA software update is supported on MG24
boards only. In this use case both the running image and the downloadable update
image must fit on the internal flash at the same time. This in turn requires
that both images are built with a reduced feature set such as disabled logging
and Matter shell. The following set of compile flags leaves out all the optional
features and results in the minimal image size:

```
chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false is_debug=false show_qr_code=false chip_build_libshell=false enable_openthread_cli=false chip_openthread_ftd=true
```
Using LZMA compression when building the .gbl file ( passing `--compress lzma` parameter to the
`commander gbl create` command) further reduces the downloaded image size.

When building an internal storage bootloader the two key configuration parameters are the
Slot Start Address and Slot Size in the Bootloader Storage Slot component. The storage slot
must not overlap with the running image and the NVM section of the flash. In other words, the
slot start address must be greater than the end of the running image address and the sum of the
start address and the slot size must be less than the address of the NVM section. The simplest
way to get the relevant addresses for the running image and NVM would be by using the Silicon Labs
`commander` tool (Device Info->Main Flash->Flash Map).
Using LZMA compression when building the .gbl file ( passing `--compress lzma`
parameter to the `commander gbl create` command) further reduces the downloaded
image size.

The pre-built bootloader binaries are configured with slot start address of 0x080EC000 and slot
size of 548864
When building an internal storage bootloader the two key configuration
parameters are the Slot Start Address and Slot Size in the Bootloader Storage
Slot component. The storage slot must not overlap with the running image and the
NVM section of the flash. In other words, the slot start address must be greater
than the end of the running image address and the sum of the start address and
the slot size must be less than the address of the NVM section. The simplest way
to get the relevant addresses for the running image and NVM would be by using
the Silicon Labs `commander` tool (Device Info->Main Flash->Flash Map).

The pre-built bootloader binaries are configured with slot start address of
0x080EC000 and slot size of 548864

## Managing the Software Version

In order for the Provider to successfully serve the image to a device during the
OTA Software Update process the Software Version parameter that the .ota file was built with
must be greater than the CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION parameter set in the application's
`CHIPProjectConfig.h` file. The Software Version parameter is set by the `-vn` parameter passed to
the `ota_image_tool.py create` command. For example, if the application's running image was built with
CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION set to 1 and if the `.ota` file is built with `-vn 2` then
the Provider will serve the update image when requested.

In order for the OTA Software Update subsystem to consider an update to be successful and for the
NotifyUpdateApplied command to be transmitted the CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION in the
updated image must exceed the software version of the running image (continuing the above example,
the image for the update must be built with CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION set to 2).
OTA Software Update process the Software Version parameter that the .ota file
was built with must be greater than the
CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION parameter set in the application's
`CHIPProjectConfig.h` file. The Software Version parameter is set by the `-vn`
parameter passed to the `ota_image_tool.py create` command. For example, if the
application's running image was built with
CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION set to 1 and if the `.ota` file is
built with `-vn 2` then the Provider will serve the update image when requested.

In order for the OTA Software Update subsystem to consider an update to be
successful and for the NotifyUpdateApplied command to be transmitted the
CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION in the updated image must exceed the
software version of the running image (continuing the above example, the image
for the update must be built with CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION set
to 2).

## Managing the Vendor and Product ID

Expand Down

0 comments on commit 57e60e5

Please sign in to comment.