GCC ARM Embedded - LinkIt 7697

MediaTek LinkIt™ software development kit (SDK) v4 GNU Compiler Collection (GCC) build environment guide provides tools and utilities to install the supporting build environment and run your projects on LinkIt for RTOS development platform. You’ll use GCC ARM Embedded command line toolchain to build your projects, and then download the project binaries to the HDK.

Before you start

You'll need a Linux OS to build the projects, and a Windows OS to download the project binaries.

You can also use a cross-compiler tool, such as MinGW on your Windows PC to build the projects.

Before LinkIt SDK v3.2, you must use a Linux machine to build the projects. The SDK supports building projects on Windows with MinGW after SDK v3.3 and later.

It is known that GCC on Windows with MinGW builds significantly slower than its Linux counterparts. It's suggested to use Linux machine to build your projects, if possible.

The prerequisites to build the project binaries: 

  • Linux:

    • Ubuntu 14.04 LTS (suggested distribution)
    • GNU make 3.81
    • 32-bit executable support
    • Linaro GCC Toolchain for ARM Embedded Processors 4.8.4
  • Windows:

    • Windows XP, Vista, 7 or 8

    • MinGW

To download binaries to HDK using tools provided by the LinkIt SDK:

  • Windows:

    • Windows XP, Vista, 7 or 8

Installing the SDK build environment on Linux

If you plan to build your projects on a Linux OS, make sure your Linux environment has the following packages installed:

  • GNU make 3.81 — The SDK build script relies on the make utility. If you're using Ubuntu Linux, you can use the following command to install it:

    sudo apt-get install build-essential
  • If you're using a 64-bit Linux OS, make sure you have 32-bit executable support packages installed. This is because the compiler toolchain in the SDK is for 32-bit executable binaries. If you are using Ubuntu Linux, you can use following command to install the packages:

    sudo dpkg --add-architecture i386
    sudo apt-get update
    sudo apt-get install libc6-i386

Installing the SDK build environment on Microsoft Windows

To build the project on Windows OS, you need to install MinGW environment first.

  1. Download mingw-get-setup.exe from here.
  2. Launch the installer, and click Install
  3. Follow the on screen instructions and keep the default settings, then click Continue to download the tool to C:\MinGW installation directory.
  4. Click Continue on the MinGW Installation Manager Setup Tool, after the download is complete.
  5. Select msys-base and mingw32-base from Basic Setup package list, and right click to bring up the menu options. Click Mark for Installation from the menu.
  6. Click Apply Changes from the Installation menu:
  7. Click Apply on the pop-up dialog window and wait for installation.
  8. Click Close to close the dialog window once the operation is complete.
  9. Navigate to C:\MinGW\msys\1.0 folder and launch the MinGW terminal by running msys.bat.
    This guide is based on the GCC build environment setup on Linux OS, however the same commands could apply to building projects on Microsoft Windows using MinGW cross-compiler tool.

Always use MinGW terminal when building projects with LinkIt SDK. Using default Windows command prompt may cause errors.