Set up toolchain
This section contains the steps to install the necessary components required to build and run an MCUXpresso SDK demo application with the Arm GCC toolchain, as supported by the MCUXpresso SDK. There are many ways to use Arm GCC tools, but this example focuses on a Windows operating system environment.
Install GCC Arm Embedded tool chain
Download and run the installer from GNU Arm Embedded Toolchain. This is the actual toolset (in other words, compiler, linker, and so on). The GCC toolchain should correspond to the latest supported version, as described in MCUXpresso SDK Release Notes.
Parent topic:Set up toolchain
Install MinGW (only required on Windows OS)
The Minimalist GNU for Windows (MinGW) development tools provide a set of tools that are not dependent on third-party C-Runtime DLLs (such as Cygwin). The build environment used by the MCUXpresso SDK does not use the MinGW build tools, but does leverage the base install of both MinGW and MSYS. MSYS provides a basic shell with a Unix-like interface and tools.
Download the latest MinGW mingw-get-setup installer from MinGW.
Run the installer. The recommended installation path is
C:\MinGW
, however, you may install to any location.Note: The installation path cannot contain any spaces.
Ensure that the mingw32-base and msys-base are selected under Basic Setup.
|
|
In the Installation menu, click Apply Changes and follow the remaining instructions to complete the installation.
|
|
Add the appropriate item to the Windows operating system path environment variable. It can be found under Control Panel->System and Security->System->Advanced System Settings in the Environment Variables… section. The path is:
<mingw_install_dir>\bin
Assuming the default installation path,
C:\MinGW
, an example is shown below. If the path is not set correctly, the toolchain will not work.Note: If you have
C:\MinGW\msys\x.x\bin
in your PATH variable (as required by Kinetis SDK 1.0.0), remove it to ensure that the new GCC build system works correctly.|
|
Parent topic:Set up toolchain
Add a new system environment variable for ARMGCC_DIR
Create a new system environment variable and name it as ARMGCC_DIR
. The value of this variable should point to the Arm GCC Embedded tool chain installation path. For this example, the path is:
See the installation folder of the GNU Arm GCC Embedded tools for the exact pathname of your installation.
Short path should be used for path setting, you could convert the path to short path by running command for %I in (.) do echo %~sI
in above path.
|
|
|
|
Parent topic:Set up toolchain
Install CMake
Download CMake 3.0.x from www.cmake.org/cmake/resources/software.html.
Install CMake, ensuring that the option Add CMake to system PATH is selected when installing. The user chooses to select whether it is installed into the PATH for all users or just the current user. In this example, it is installed for all users.
|
|
Follow the remaining instructions of the installer.
You may need to reboot your system for the PATH changes to take effect.
Make sure
sh.exe
is not in the Environment Variable PATH. This is a limitation ofmingw32-make
.
Parent topic:Set up toolchain
Parent topic:Run a demo using Arm GCC