This is the documentation for the latest (main) development branch of mcuxpresso sdk. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

Build a demo application using Arm GCC

This section describes the steps to configure the command-line Arm GCC tools to build, run, and debug demo applications. Additionally, this section lists the necessary driver libraries provided in the MCUXpresso SDK. The hello_world_sm demo application targeted for the IMX95 series hardware platform is used as an example, though these steps can be applied to any board, demo, or example application in the MCUXpresso SDK.

Linux OS host

The following sections provide steps to run a demo compiled with Arm GCC on Linux host.

Set up toolchain

This section contains the steps to install the necessary components required to build and run a MCUXpresso SDK demo application with the Arm GCC toolchain, as supported by the MCUXpresso SDK.

Install GCC Arm embedded toolchain

Download and run the installer from the GNU Arm Embedded Toolchain Downloads page. The GNU Arm embedded toolchain contains the GCC compiler, libraries, and other tools required for bare-metal software development. The GCC toolchain should correspond to the latest supported version, as described in the MCUXpresso SDK Release Notes for IMX95 Series (document MCUXSDKIMX95SERIESRN).

Parent topic:Set up toolchain

Add a new system environment variable for ARMGCC_DIR

Create a new system environment variable and name it ARMGCC_DIR. The value of this variable should point to the Arm GCC embedded toolchain installation path. For this example, the path is: $ export ARMGCC_DIR=<path_to_GNUARM_GCC_installation_dir>.

Parent topic:Set up toolchain

Parent topic:Linux OS host

Build an example application

To build an example application, follow these steps.

  1. Change the directory to the example application project directory, which has a path similar to the following: <install_dir>/boards/<board_name>/<example_type>/<application_name>/armgcc. For example, the exact path is: <install_dir>/boards/imx95lpd5evk19/demo_apps/hello_ world_sm/armgcc.

  2. Run the build_debug.sh script at the command-line to perform the build. The output is shown as below:

    $ ./build_debug.sh
    -- TOOLCHAIN_DIR:
    -- BUILD_TYPE: debug
    -- TOOLCHAIN_DIR:
    -- BUILD_TYPE: debug
    -- The ASM compiler identification is GNU
    -- Found assembler:
    -- Configuring done
    -- Generating done
    -- Build files have been written to:
    Scanning dependencies of target hello_world.elf
    < -- skipping lines -- >
    [100%] Linking C executable debug/hello_world.elf
    [100%] Built target hello_world.elf
    

    Note: build_debug/release.sh are ram target, build_ddr_debug/release.sh are ddr target (only imx95lpd5evk19 hello_world_sm support ddr target this release, the same as iar).

Parent topic:Linux OS host

Parent topic:Build a demo application using Arm GCC

Windows OS host

The following sections provide steps to run a demo compiled with Arm GCC on Windows OS host.

Set up toolchain

This section contains the steps to install the necessary components required to build and run a MCUXpresso SDK demo application with the Arm GCC toolchain on Windows OS, as supported by the MCUXpresso SDK.

Install GCC Arm embedded toolchain

Download and run the installer from the GNU Arm Embedded Toolchain Downloads page. The GNU Arm embedded toolchain contains the GCC compiler, libraries, and other tools required for bare-metal software development. The GCC toolchain should correspond to the latest supported version, as described in MCUXpresso SDK Release Notes for IMX95 Series(document MCUXSDKIMX95SERIESRN).

Parent topic:Set up toolchain

Add a new system environment variable for ARMGCC_DIR

Create a new system environment variable and name it ARMGCC_DIR. The value of this variable should point to the Arm GCC embedded toolchain installation path. For this example, the path is: C:\Program Files (x86)\GNU Arm Embedded Toolchain\9 2020-q2-update. Reference the installation folder of the GNU Arm GCC embedded tools for the exact path.

Parent topic:Set up toolchain

Parent topic:Windows OS host

Build an example application

To build an example application, follow these steps.

  1. Open the GCC Arm embedded toolchain command window. To launch the window on the Windows operating system, select Start-> Programs-> GNU Tools ARM Embedded <version>-> GCC Command Prompt.

  2. Change the directory to the example application project directory, which has a path similar to the following: <install_dir>/boards/<board_name>/<example_type>/<application_name>/armgcc. For this example, the exact path is: <install_dir>/boards/ imx95lpd5evk19/demo_apps/hello_world/armgcc.

  3. Type build_debug.bat at the command-line or double-click the build_debug.bat file in Windows. Explorer to perform the build. The output is as shown in Figure 2.

Parent topic:Windows OS host

Parent topic:Build a demo application using Arm GCC