MCUboot with BeagleConnect Freedom

Hello everyone. It has been a while since my last post. Today, I will go over using MCUboot based serial OTA on BeagleConnect Freedom. Everything required has already been merged to upstream Zephyr now, so no special considerations should be required.

Introduction

BeagleConnect Freedom contains a simple bootloader in ROM, which boots the Zephyr application from the Flash. However, this minimal bootloader does not support advanced functionality such as OTA updates, rollbacks, etc.

Zephyr supports MCUboot, which is a secure bootloader for 32-bits microcontrollers. It helps add support for advanced production usecases such as secure boot, OTA, rollbacks, etc.

In this post, I will only be going over OTA over serial. However, it is possible to support OTA over IEEE802154g and other transport protocols.

MCUboot storage use

When using MCUboot with BeagleConnect Freedom, 56KiB is reserved for MCUboot. This leaves 640KiB of main flash for use by the Zephyr application.

The on-board SPI flash is used to store the secondary image. So outof 2MiB, 1280KiB is available for Zephyr application use.

Demo

For the demo application, I will be using the smp_svr example provided by Zephyr.

Setup Zephyr

Follow the Getting Started Guide to set up Zephyr on your machine. Currently, mainline Zephyr is required for out-of-the-box MCUboot support on BeagleConnect Freedom.

Setup AuTerm

Download and set up AuTerm as described in its repository.

Build Zephyr Application

  1. Build smp_svr + MCUboot using sysbuild.
west build -p -b beagleconnect_freedom --sysbuild samples/subsys/mgmt/mcumgr/smp_svr -- -DEXTRA_CONF_FILE="overlay-serial.conf"
  1. Combine the MCUboot and application binary. The application offset should be 56KiB.
cp build/mcuboot/zephyr/zephyr.bin zephyr.bin
dd conv=notrunc bs=1024 seek=56 if=build/smp_svr/zephyr/zephyr.signed.bin of=zephyr.bin
  1. Flash the application.
cc1352_flasher --bcf zephyr.bin
  1. Check serial output.
❯ tio /dev/ttyACM0
[11:52:04.720] tio 3.9
[11:52:04.720] Press ctrl-t q to quit
[11:52:04.720] Connected to /dev/ttyACM0
** Booting MCUboot v2.2.0-104-gbf5321bb6906 ***
*** Using Zephyr OS build v4.2.0-1763-gffb28eed1da9 ***
*** Booting Zephyr OS build v4.2.0-1763-gffb28eed1da9 ***
[00:00:00.004,699] <inf> smp_sample: build time: Aug 18 2025 11:51:48

Perform Serial OTA

  1. Launch AuTerm.

  2. Select BeagleConnect Freedom Port.

  3. Verify the port.

  4. Open the Port. This will drop you into the Terminal tab. Take note of the build time.

  5. Press the reset button on BeagleConnect Freedom and verify the serial output.

  6. Rebuild the firmware as described above

  7. Navigate to the MCUmgr tab.

  8. Select the newly built signed firmware.

  9. Switch action from Test to Confirm.

  10. Press the Go button to start firmware upload.

  11. Wait for the firmware upload to finish.

  12. Navigate to the Terminal tab to verify that the build time has changed.

Ending Thoughts

That is all for this post. Hopefully, this serves as an example for anyone trying to have OTA working with BeagleConnect Freedom.

 

Helpful links