Tools and BSP setup

To compile the examples from the MCUXpresso SDK a tool chain for the Cortex®-M4/7 is needed. Therefore, please read the chapter ‘Install GCC Arm embedded tool chain’ inside the document ‘Getting Started with MCUXpresso SDK for EVK-MIMX8xx.pdf’, which is provided by the SDK. This documentation describes only tools setup under Linux.

installation of the GNU Toolchain

To delop with the SDK, especially to build the SDK samples, a cross compiler toolchain is necessary. A ready to use GNU Arm Embedded Toolchain can be downloaded from the arm developer web site.

The actual toolchain version at the moment is:

../../../_images/SDKXpresso-toolchain-july-20211.png

There are toolchains for Windows, Linux or MacOS operating systems (32- or 64 bit).

For use with Linux Ubuntu OS hosts download and unpack the file: gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2

Create a new system environment variable with the name ARMGCC_DIR, that points to your Arm GCC Embedded tool chain installation path:

export ARMGCC_DIR=<path to your toolchain installation>/gcc-arm-none-eabi-10-2020-q4-major

Append your PATH environment variable with the folder to your tool chain’s binaries:

export PATH=$PATH:<path to your toolchain installation>/gcc-arm-none-eabi-10-2020-q4-major/bin

check your installation by opening a new terminal window and type the command:

arm-none-eabi-gcc --version arm-none-eabi-gcc
(GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

installation of CMake

By default, the SDK is using CMake and not directly normal make files. If CMake is not installed by default in your Ubuntu distribution, you can do that in the following way:

sudo apt install cmake

Customizing the BSP for coprocessor support

To download and start the Cortex®-M4/7 firmware from the U-Boot, the U-Boot command bootaux must be implemented. Also the Linux-kernel needs some features implemented to communicate between the main processors and the coprocessor.

To support customers, Ka-Ro provides the distro feature copro. To add the distro feature to your build, go to your yocto build folder and open the file conf/bblayers.conf

then add the line:

DISTRO_FEATURES:append = " copro"

Furthermore, some special entries into the device tree are necessary. These are provided by the devicetree overlay karo-copro

To add the karo-copro overlay, the name of the copro-overlay should be added to the appropriate overlays_* variable:

setenv overlays_<baseboard> ${overlays_<baseboard>} karo-copro
saveenv
reset