Building Device Management Client for non-Mbed OS operating systems
Tip: If you cannot access some of the repos referenced in this section, please contact us to request access.
For all requirements, see the tools and account section.
Including Device Management Client in your application
Here are the typical steps when using Device Management Client with an application:
Add the following files and folders to your application:
.libfile for importing a specific version of Device Management Client.
CMakeLists specific to the application. It contains all the necessary include and source paths to build Device Management Client for a given platform.
Contains the platform-specific components and deployment scripts.
Only needed for non-Mbed OS builds.
Fetch Device Management Client and the needed platform source-files by running
mbed deploy(for those using Mbed CLI). This deploys all the
Additional steps for non-Mbed OS builds
If you are building for a system other than Mbed OS, please set up the sources, and configure the build for your target.
Defining a target and toolchain
Configuring a build requires selecting:
Toolchain - The name of the toolchain used for compilation.
Specify your platform. We support ARMCC, ARMGCC, GCC(x86).
Target - The build target is a variable composed of three parts:
Specify your platform. We support
Specify your OS. We support
Define your SSL library. We support Mbed TLS.
The currently supported reference implementation is
Configuring the build
For a simple build (this will also compile):
python pal-platform/pal-platform.py fullbuild --target <PLATFORM_OS_SSL> --toolchain <TOOLCHAIN> --external ./../define.txt --name mbedCloudClientExample.elf
For a manually configured build:
Deploy, and generate the Make directory.
python pal-platform/pal-platform.py deploy --target=<PLATFORM_OS_SSL> generate
For example, this configuration is for native Linux OS running on an
x86_64platform with Mbed TLS as the SSL library:
python pal-platform/pal-platform.py deploy --target=x86_x64_NativeLinux_mbedtls generate
The script generates a build directory in the form of
__<PLATFORM_OS_SSL>. In our example, the generated build directory is
Configure the application for your selected target from the generated build directory:
cmake -G "<SYSTEM_GENERATOR>" -DCMAKE_BUILD_TYPE=<BUILD_TYPE> -DCMAKE_TOOLCHAIN_FILE=<TOOLCHAIN_RULES_FILE>
You can, and probably need to, give the following variables to generate Makefiles for the correct target:
Specify a build system generator. For Unix makefiles, use
Select either a
Define the location of the toolchain rules that CMake should use to generate Makefiles.
For example, for the above configuration, you need the following commands for CMake to set up the right Makefiles:
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=./../pal-platform/Toolchain/GCC/GCC.cmake
For more details on the manual build procedure, see the PAL platform utility documentation.
Building the application
make <your application>.elf
This builds only your main application executable, based on the name that you gave in your application's