Mistake on this page? Email us

Building a firmware image for update on an Mbed OS device

This tutorial explains how to build a firmware image for a supported Mbed OS device that can be updated using the Device Management Update client (if the device is connected to Device Management), and how to flash this image to your device.

This tutorial shows you how to compile, then install, a firmware image, for Mbed OS devices.

There is also a tutorial that provides instructions on how to build a firmware image for the Raspberry Pi 3 device target.


You need a supported target running Mbed OS. For a list of all supported targets and configurations, see device requirements.

You should have also:

Compile the firmware image

Once you have prepared your environment and integrated the Update client into your user application, the next step is to build this application into an image that can be installed on the device. This firmware image includes the:

  • User application.
  • Update client.
  • Operating system.

Compile the example app for K64F (or change the target accordingly):

mbed compile -m K64F -t GCC_ARM

The above command creates two firmware images:

  • The full image, which combines the application with the bootloader and metadata, and is used for the initial programming of the device.
  • The update image, which contains only the application and is used for updating the device.

Full image: BUILD/K64F/GCC_ARM/mbed-cloud-client-example.bin Update image: BUILD/K64F/GCC_ARM/mbed-cloud-client-example_update.bin

The above example compiles the user application for the K64F target, using the GCC toolchain, and creates the file mbed-cloud-client-example.bin in your BUILD directory. You should modify the above command to reference your device and preferred tool chain. This is the firmware image, which contains your application, its metadata, and the bootloader.

Installing the firmware image

Now that you have a firmware image, you can install this on the device. Installing this image on your device enables you to remotely update its firmware.

Note: You only need to install the image on the device if it currently does not have your application and Update client installed. If you have previously installed your application and Update client on the device and connected it to Device Management, then you can update the firmware using a manifest file and an update campaign.

Copy the compiled firmware image to the device as it appears as a mass storage device. For more information on how to program the device, please see Flashing the binary to the device.

After resetting the device and connecting to Device Management, this device is now ready to receive firmware updates remotely.

After the device has finished registering with Device Management, it reports an endpoint name. Make a note of this, as you need this to update the device.

Now that you have a device that can be remotely updated, you can create a manifest file which enables you to deliver updates to remote devices.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.