Install The SDK

The SDK built using BSP-Yocto-NXP-i.MX7-PD23.1.0 includes a cross-compilation toolchain and sysroots directory for building your applications against, allowing your software that is built on your Ubuntu Host Machine to be executed on the phyCORE-i.MX7 SOM. This guide walks through the installation of the SDK and how to use it to cross-compile a basic Hello World example for running on the phyCORE-i.MX7‘s Cortex-A cores.

Note

This guide will walkthrough the SDK installation using a the pre-built SDK installer, but head over to the Build the BSP guide if you require building your own.

Requirements

The following system requirements are recommended to successfully install the SDK and to eventually build the BSP in its entirety. Deviations from these requirements may suffice if you don’t intend to use the same machine for building the BSP:

  • Ubuntu 20.04 LTS, 64-bit Host Machine with root permission

    • If using a virtual machine, VMWare Workstation, VMWare Player, and VirtualBox are all viable solutions.

  • 100GB free disk space or greater (can be smaller if you don’t intend to build the BSP)

  • 8GB of RAM or greater

  • 4x processing cores available to the Ubuntu Host Machine or greater

  • SD card reader operational under Linux

  • Active Internet connection

Download the Pre-Built SDK Installer or Build it Yourself

First, navigate to a directory containing the SDK installer. If you built it yourself, it will be found at $BUILDDIR/deploy/sdk/, but the following steps will help you download a pre-built SDK:

Host (Ubuntu)

cd ~/Downloads

Use the following command to download the pre-built SDK installer to the current working directory:

Host (Ubuntu)

wget https://fileshare.phytec.com/index.php/s/zMzNjH8xeoX7EgF/download/phytec-ampliphy-vendor-xwayland-glibc-x86_64-phytec-qt6demo-image-cortexa7t2hf-neon-toolchain-4.0.14.sh

Change the permissions of the installer:

Host (Ubuntu)

sudo chmod a+x phytec-ampliphy-vendor-xwayland-glibc-x86_64-phytec-qt6demo-image-cortexa7t2hf-neon-toolchain-4.0.14.sh

Run the installer:

Host (Ubuntu)

./phytec-ampliphy-vendor-xwayland-glibc-x86_64-phytec-qt6demo-image-cortexa7t2hf-neon-toolchain-4.0.14.sh

When prompted, install the SDK to the default location at /opt/ampliphy/BSP-Yocto-NXP-i.MX7-PD23.1.0 or, optionally, create a custom install location. This and other guides in the phyCORE-i.MX7 wiki will assume you installed the SDK to the default location but just remember where if you choose somewhere else.

Source the Cross-Compilation Environment

Note

Sourcing both the Yocto BSP environment and the Yocto SDK environment within the same terminal session can cause problems, it is advised to use separate terminal sessions for the two development efforts.

This script will have to be sourced in every new terminal session you plan to use for cross-platform development:

Host (Ubuntu)

. /opt/ampliphy-vendor-xwayland/4.0.14/environment-setup-cortexa7t2hf-neon-phytec-linux-gnueabi

# this command is equivalent

source /opt/ampliphy-vendor-xwayland/4.0.14/environment-setup-cortexa7t2hf-neon-phytec-linux-gnueabi

Note

Remember the location of /opt/ampliphy-vendor-xwayland/4.0.14/environment-setup-cortexa7t2hf-neon-phytec-linux-gnueabi and the command you used to source it, you’ll need this handy throughout your application development!

Now you can leverage the cross-compilation toolchain in your project:

Example Output

user@ubuntu:~$ which $CC
/opt/ampliphy-vendor-xwayland/4.0.14/sysroots/x86_64-phytecsdk-linux/usr/bin/arm-phytec-linux-gnueabi/arm-phytec-linux-gnueabi-gcc