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.

Porting Device Management Client with PAL for different operating systems

This section begins by giving an overview of the tasks needed to port the PAL platform APIs to a new target platform. It explains the PAL modules and layers, as well as their porting order. It then discusses the basic configurations for PAL porting and gives instructions for porting the following PAL modules: the RTOS, networking, Crypto, FileSystem and TLS/DTLS modules. Each instruction set explains the module scope, prerequisites for the porting stage, and the porting result, while providing porting notes and reference implementations.

Testing your PAL port for different operating systems

PAL provides a test suite to test the service API, which is used by the services running on top of PAL. This section guides you through compiling and running the tests, understanding the tested modules, the PAL test structure, the PAL test requirements, how to customize PAL tests and the results that you should expect to see if a PAL port is working correctly.

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.

Migrating from Device Management Client 1.2 to latest version

This section is for those using a customized or propriety porting layer based on Device Management Client 1.2. We’ve added a number of features and security enhancements since Device Management Client 1.2, which have implications for the PAL porting layer. This guide discusses the main changes and helps you make the adjustments required to upgrade to the current version. It also explains how to change a customized porting layer and the changes that you need to make in each module – the RTOS module, Crypto module, TLS module and PAL executables – to migrate it from Device Management Client 1.2 to the current release.