Skip to content

2. FW Update Example Tutorial

This example explains the firmware update process for both ABAB and ACAB silicon revisions. Use this example as a reference for integrating TROPIC01 firmware updates into your application. You will learn:

  • How to read the current firmware versions.
  • How to update the firmware using lt_do_mutable_fw_update(), which performs the recommended FW update procedure.
  • How to handle TROPIC01 Maintenance Mode to reduce the attack surface.

TROPIC01 Firmware

For more information about the firmware itself, refer to the TROPIC01 Firmware section.

Firmware Update Precautions

Use a stable power source and avoid disconnecting the TROPIC01 (devkit) or rebooting your host device (computer or microcontroller) during the update. Interrupting the firmware update can brick the device.

Build and Run

Building and running the example

Go to the example's project directory:

cd examples/esp32/<your_board>/fw_update/

Build, flash and run the serial monitor using this command:

idf.py build flash monitor
After successful execution, your chip will contain the latest firmware and will be compatible with the current Libtropic API.

Closing the ESP-IDF serial monitor

To close the ESP-IDF serial monitor, press Ctrl + ]. Refer to the ESP-IDF monitor documentation for a full list of available keyboard shortcuts.

TBA

TBA

What if firmware update failed?

Check out the dedicated section in FAQ.

Configuration

In addition to the Libtropic CMake options used to configure Libtropic, this example provides the following CMake options:

  • LT_SH0_KEYS (default: "prod0") selects which pairing keys in slot 0 are used. Switch to engineering-sample pairing keys if your TROPIC01 is provisioned with them:

    Switching to engineering sample pairing keys
    idf.py -DLT_SH0_KEYS="eng_sample" build flash monitor
    

    TBA

    TBA

    Additionally, see Default Pairing Keys for a Secure Channel Handshake for more information.

  • LT_DISABLE_MAINTENANCE_MODE (default: "ON") controls whether the FW update example disables Maintenance Mode in R-Config after a successful FW update. Set to "OFF" or 0 if Maintenance Mode is enabled in your TROPIC01 and you don't want the FW update example to disable it:

    Keeping Maintenance Mode enabled after FW update
    idf.py -DLT_DISABLE_MAINTENANCE_MODE=0 build flash monitor
    

    TBA

    TBA

    Not recommended

    This step is not recommended because it can increase the attack surface.

Next example