Documentation

Mistake on this page? Email us

Porting Pelion Device Management Client to devices

The Platform Abstraction Layer (PAL) connects Device Management Client to the underlying operating system. PAL sits between the device or operating system and the Device Management Client library, providing a single API that services can use across all devices and operating systems. PAL enables easy and fast portability of Device Management Client, and allows it to operate over a wide range of Arm cortex-based platforms running different operating systems with various libraries. The Device Management Client Porting layer for Mbed OS and Linux is available from Arm. If you want to run Device Management Client on your own custom platform, you need to port all the PAL platform modules, as the headers of the PAL platform API describe. You may also need to change some of the configuration files.

This chapter covers:

Porting a new target for Mbed OS using secure storage KVStore with internal flash

This section explains how to port Device Management Client for a board that supports Mbed OS. This section also covers how to prepare the bootloader to enable update functionality for the given board.

This guide is for devices that only want to use internal flash to store all client persistent data (certificates and other secure elements) and firmware update images.

Porting a new target for Mbed OS using external storage with secure storage (KVStore)

This section explains how to port Device Management Client for a board that supports Mbed OS. This section also covers how to prepare the bootloader to enable update functionality for the given board.

This guide is for devices that use internal flash to store only minimum client persistent data, and uses external storage (for example SPI flash or SD card) for storing credentials and firmware update images.

Porting a new target for Mbed OS using ESFS-SOTP

This section explains how to port Device Management Client and Client Lite for a board that supports Mbed OS. This section also covers how to prepare the bootloader to enable update functionality for the given board.

Advanced configuration for Mbed OS

This section describes the network configuration and how to enable support for non-TRNG targets.

Using the pal-platform utility to deploy dependent build components

The pal-platform utility script deploys and generates platform-dependent files needed to build and run non-Mbed OS applications. This section describes the pal-platform utility, its requirements and usage. It also provides examples of the deploy, generate, clean and fullbuild subcommands. If you use a manual approach, rather than the fullbuild command, then the generate step will result in a build directory, which contains CMake files. You can use the cmake tool to generate Makefiles for debug binaries for the target toolchain from this build directory. The section concludes by explaining how to add a new port to the pal-platform.

Building and configuring Device Management Client for different operating systems

This section explains how to build an application that uses Device Management Client for different platforms. We recommend using Mbed CLI for Mbed OS, which allows you to build directly from the command-line and generate Makefiles and project files for various IDEs. For Linux, you can build Device Management Client by using Makefiles that the CMake build system autogenerates. The section then discusses how to build the R1.3 or higher versions of Cloud Client for different operating systems, explaining how to include Device Management Client in your application, additional steps for non-Mbed OS builds and how to build the application itself. The section concludes by discussing the Device Management Client error recovery mechanism for connectivity and firmware update error handling, as well as debugging devices running Device Management Client.