Tools and u-boot setup¶
To compile the examples from the MCUXpresso SDK a tool chain for the Cortex®-M4 is needed. Therefore, please read the chapter ‘Install GCC Arm embedded tool chain’ inside the document ‘Getting Started with MCUXpresso SDK for EVK-MIMX8MM.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:
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
setup of u-boot¶
To download and start the Cortex®-M4 firmware from the u-boot, the u-boot command bootaux must be implemented. please check this with the following u-boot command:
bootaux - Start auxiliary core Usage: bootaux <address> [<core>] - start auxiliary core [<core>] (default 0), at address <address>
If this command is not found you have to add it to your u-boot configuration and rebuild it. Therefore, locate the configuration file in your yocto build tree. For the TX8M-1610 the appropriate config file is tx8m-1610_defconfig.
Add the following 3 lines to that file:
CONFIG_IMX_BOOTAUX=y CONFIG_BOOTAUX_RESERVED_MEM_BASE=0x88000000 CONFIG_BOOTAUX_RESERVED_MEM_SIZE=0x08000000
Configure, rebuild, deploy and package your new u-boot with the following yocto commands:
bitbake -f -c configure u-boot-imx bitbake -f -c compile u-boot-imx bitbake -f -c deploy u-boot-imx bitbake imx-boot