.. _cross_compilation_setup: Cross Compilation Environment ############################# The SiMa.ai Palette SDK provides isolated environments for cross-compiling applications targeting different hardware and operating systems. Developers must enter the correct SDK container and activate the platform-specific toolchain before building their applications. SiMa.ai supports two primary target environments: 1. **Modalix**: Uses **eLxr Linux**, a Debian-based OS offering standard package management (``apt``). 2. **MLSoC**: Uses **Yocto Linux**, a minimal and deterministic embedded OS. To setup the cross compilation environment, follow the steps below for MLSoC or Modalix respectively. .. tabs:: .. tab:: eLxr SDK (Modalix) **1. Enter the SDK Container** From your host machine, enter the eLxr SDK container: .. code-block:: bash sima-user@host:~$ sima-cli sdk elxr **2. Activate the Toolchain** Once inside the container, initialize the build environment: .. code-block:: bash user@elxr-sdk:/home/docker$ source /opt/bin/simaai-init-build-env modalix **3. Verify the Environment** Check the ``$CC`` variable to confirm the cross-compiler is active: .. code-block:: bash user@elxr-sdk:/home/docker$ echo $CC Output should resemble: ``aarch64-linux-gnu-gcc`` .. tab:: Yocto SDK (MLSoC) **1. Enter the SDK Container** From your host machine, enter the Yocto SDK container: .. code-block:: bash sima-user@host:~$ sima-cli sdk yocto **2. Verify the Environment** In the Yocto SDK the build environment should be automatically activated. Check the ``$CC`` variable to confirm the cross-compiler is active: .. code-block:: bash user@yocto-sdk:/home/docker$ echo $CC Output should resemble: ``aarch64-poky-linux-gcc ...``