Linux Embedded
Notice: The Linux Embedded Client SDK does not include a W3bstream Client object. To create API calls, you will need to utilize the HTTP/MQTT clients directly. Detailed examples can be located within the SDK repository for your reference.
Set up the build environment
Iotex SDK officially supports a limited set of build environments and setups. In this context, official support means that the environments listed below are actively used by team members and active developers, hence users should be able to recreate the same configurations by following the instructions described below. In case of problems, the Iotex SDK team provides support only for these environments, but building in other environments can still be possible.
The following environments are supported:
Docker container (Ubuntu 22.04)
Install the VS Code Remote: Dev containers extension. Open the repository inside VS Code and click the "Open Workspace in Container" pop up that appears. More info on using dev containers in VS Code in the VS Code documentation.
Linux (Ubuntu 18.04 or 22.04)
Run the following command to install the required dependencies:
Windows 11 x64
Install the following dependencies:
Git client: https://git-scm.com/download/win
CMake: https://cmake.org/download/
Python3 and pip (included by default): https://www.python.org/downloads/
Get the source code
Run the following command to clone the repository:
Build
The build process is managed by CMake. The build can be customized by passing CMake options. For a full list of CMake options see the main CMakeLists.tx. Below is a description of the most common ones:
CRYPTO_IMPL: the crypto library to use. Possible values: "MbedTLS" or "TinyCrypt". Defaults to "MbedTLS". Note that TinyCrypt is not supported yet.
BUILD_IOTEX_F: build the IoTeX Firmware component. Defaults to ON.
BUILD_PSA_TEST_SUITE: build the PSA Architecture test suite. Defaults to OFF.
BUILD_EXAMPLE_<example_name>: build any of the examples in the examples directory. Defaults to OFF.
GIT_SUBMODULE_UPDATE: download or update any dependencies specified as submodules. Defaults to ON.
For example, if you want to build the SDK using Iotex Firmware + MbedTLS + PSA test suite, you can run the following commands:
Once the build finishes, you can run the tests executable using the following command:
You should see output similar to the one below:
Examples
Examples to demonstrate the usage of the SDK can be found in the examples of the SDK. Each example contains a README file with usage instructions.
Last updated