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:
- The update image, which contains only the application and is used for updating the device:
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.
- Connect the device to your computer. It appears as a mass storage device.
- 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.
- Reset the device.
- The device connects to Device Management and is ready to receive firmware updates remotely.
- The device registers with Device Management and reports an endpoint name. Make a note of this because you need this to update the device.
- 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.