Mistake on this page? Email us

Preparing images

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

There are other tutorials for:

Compiling the firmware image

You need to build the 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 application for K64F (or change the target accordingly):

mbed compile -m K64F -t GCC_ARM

The 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: BUILD/K64F/GCC_ARM/mbed-cloud-client-example.bin
  • The update image, which contains only the application and is used for updating the device: BUILD/K64F/GCC_ARM/mbed-cloud-client-example_update.bin.

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

Modify the command to reference your device and preferred tool chain. Read more about the firmware image.

Installing the firmware image

You need to install the initial firmware on the device. By installing this image on your device, you can remotely update its firmware.

  1. Connect the device to your computer. It appears as a mass storage device.
  2. Copy the compiled initial firmware image to the device. For more information on how to program the device, see Flashing the binary to the device.
  3. Reset the device.
  4. The device connects to Device Management and is ready to receive firmware updates remotely.
  5. The device registers with Device Management and reports an endpoint name. Make a note of this because you need this to update the device.
  6. Now that you have a device that can be remotely updated, you can create a manifest file, with which you can deliver updates to remote devices.