> For the complete documentation index, see [llms.txt](https://trillbit.gitbook.io/trillbit-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trillbit.gitbook.io/trillbit-sdk/embedded-linux/trill-sdk-for-embedded-linux/setup-guide/compiling-example-binaries.md).

# Compiling example binaries

1. Clone the github repository: [https://github.com/Trillbit-Inc/TrillbitSDK-linux ](https://github.com/Trillbit-Inc/TrillbitSDK-linux)
2. Navigate to the root of the repository and execute the following:&#x20;

{% code overflow="wrap" %}

```
First create the build directory

mkdir build && cd build
Next invoke the cmake command. The cmake command expects a -DPLATFORM_OPTION=<x86_64/aarch64> tag , if nothing is given x86_64 is assumed.

To cross compile for aarch64 from a x86_64, an additional -DCMAKE_TOOLCHAIN_FILE="../toolchains/aarch64_gcc_linux.cmake" must be provided.

To have a local install path -DCMAKE_INSTALL_PREFIX="../install" can be given

Normal build:

cmake .. -DPLATFORM_OPTION=<x86_64/aarch64> -DCMAKE_INSTALL_PREFIX="../install"

Cross-compiling:

cmake .. -DPLATFORM_OPTION=<x86_64/aarch64> -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_TOOLCHAIN_FILE="../toolchains/aarch64_gcc_linux.cmake"
```

{% endcode %}
