C

NXP i.MX RT1064 Eval Kit (MIMXRT1064-EVK) Setup Instructions

This topic helps you set up the development environment for NXP's i.MX RT1064.

Board features

  • MIMXRT1064DVL6A MCU featuring 600MHz ARM® Cortex®-M7 core, 4-MBytes Flash, 1024-kbytes RAM
  • 4.3” 480x272 RGB Touch Display
  • 256-Mbit SDRAM memory
  • 512-Mbit Hyper Flash
  • 64-Mbit QSPI Flash
  • Socket for SD card

Setting up development environment

  • Ensure that the common NXP prerequisites are met.
  • Download EVK-MIMXRT1064 SDK 2.7.0 and create the EVK_MIMXRT1064_SDK_PATH environment variable ( Download )
    • Download EVK-MIMXRT1064 SDK 2.7.0 and extract it to desired location
    • Create EVK_MIMXRT1064_SDK_PATH environment variable and set its value to:
      <SDK_PATH>\SDK_2.7.0_EVK-MIMXRT1064

      where <SDK_PATH> points to the directory where EVK-MIMXRT1064 SDK is extracted

Prebuilt demos and examples

The package for NXP i.MX RT1064 Eval Kit board comes with the following prebuilt demos and examples

You can find it in the demos_images directory.

See Flashing Instructions for NXP boards section on how to flash the binaries to the board.

Demos and examples source code

Qt for MCUs provides the source code of several demos and examples. You can modify, build, and flash custom binaries onto the target device.

Source code for supported demos and examples is organized in the following directory structure:

Note: Demos or examples that are highlighted in bold are the only ones supported on this board.

Building applications with prebuilt Qt Quick Ultralite libraries

The following example builds the watch demo for this board:

cd %Qul_DIR%\demos\watch
mkdir build
cd build
cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=%Qul_DIR%\lib\cmake\Qul\toolchain\armgcc.cmake -DQUL_PLATFORM=MIMXRT1064-EVK
cmake --build .

Once you have successfully built the watch demo, you can flash it from command line:

cmake --build . --target flash_watch

The same procedure applies to any other application.

Note: By default, the asset data for application is copied to SDRAM on application startup. In order to keep resources in external flash, and not load it to RAM on startup, use the QUL_COPY_TO_RAM cmake option with the value Never when adding assets to the application with qul_add_resource.

Building Qt Quick Ultralite

If your license provides access to the Qt Quick Ultralite sources, build it with all the supported demos/examples. Run the following commands from the terminal window:

cd %Qul_DIR%
mkdir build
cd build
cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=..\lib\cmake\Qul\toolchain\armgcc.cmake -DQUL_GENERATORS=..\lib\cmake\Qul\QulGenerators.cmake -DQUL_PLATFORM=MIMXRT1064-EVK

Once Qt Quick Ultralite is built successfully, you can flash the supported demos/examples from command line.

cmake --build . --target flash_<DEMO_OR_EXAMPLE_NAME>

where, DEMO_OR_EXAMPLE_NAME is the name of supported demo/example.

Building applications using a custom built Qt Quick Ultralite

This section describes how to build an application, using a custom Qt Quick Ultralite build.

  • First, you must set up the development environment as described earlier.
  • Build Qt Quick Ultralite from the modified sources and install it to a custom location.
    mkdir some\path\custom_builds\qul
    cd some\path\custom_builds\qul
    
    mkdir qul-build
    cd qul-build
    
    cmake <PATH_TO_INSTALLED_QT_SDK>\QtMCUs\<version> \
          -G "Ninja" \
          -DCMAKE_INSTALL_PREFIX=some\path\custom_builds\qul \
          -DCMAKE_BUILD_TYPE=Release \
          -DCMAKE_TOOLCHAIN_FILE=<PATH_TO_INSTALLED_QT_SDK>\QtMCUs\<version>\lib\cmake\Qul\toolchain\armgcc.cmake \
          -DQUL_PLATFORM=<PLATFORM_NAME> \
          -DQUL_BUILD_TESTS=OFF \
          -DQUL_BUILD_DEMOS=OFF \
          -DQUL_BUILD_EXAMPLES=OFF \
          -DQUL_GENERATORS=<PATH_TO_INSTALLED_QT_SDK>\QtMCUs\<version>\lib\cmake\Qul\QulGenerators.cmake \
    
    ninja install
  • Use the custom Qt Quick Ultralite to build your application, which is not part of the Qt Quick Ultralite source tree:
    cd some\path\custom_builds
    mkdir app # Put your application here. You can use the redbutton example from the SDK.
    cd app
    mkdir build
    cd build
    
    set QUL_DIR=some\path\custom_builds\qul
    cmake .. \
          -G "Ninja" \
          -DCMAKE_BUILD_TYPE=Release \
          -DCMAKE_TOOLCHAIN_FILE=some\path\custom_builds\qul\lib\cmake\Qul\toolchain\armgcc.cmake \
          -DQUL_GENERATORS=<PATH_TO_INSTALLED_QT_SDK>\QtMCUs\<version>\lib\cmake\Qul\QulGenerators.cmake \
          -DQUL_PLATFORM=<PLATFORM_NAME> \
    
    ninja
    ninja flash_<YOUR_APP_NAME>

Reading debug messages

By default, the output of printf calls are redirected to a virtual serial port, which is exposed on the host machine via USB.

Debugging

  • For convenience, you can set an environment variable that points to the Redlink tool, which is part of the MCUXpresso IDE.
    set REDLINK=%MCUXpressoIDE_PATH%\ide\binaries\crt_emu_cm_redlink

    Where, %MCUXpressoIDE_PATH% is an environment variable pointing to the MCUXpresso IDE installation directory.

  • Open a terminal window and run the following command:
    %REDLINK% --server :50032 --mi -2 -vc -p MIMXRT1064xxxxA --ConnectScript RT1064_connect.scp --flash-driver= -x %Qul_DIR%\lib\cmake\boards\nxp\mimxrt1064-evk

    GDB Server is now listening for TCP connections on port, 50032.

    Note: To change TCP port used by redlink_server, change --server :50032 to different value.

  • Run arm-none-eabi-gdb in a separate console
    %ARMGCC_DIR%\bin\arm-none-eabi-gdb.exe <PATH_TO>\your_app.elf
  • Connect to the target via the gdbserver in the arm-none-eabi-gdb console using
    (gdb) target remote :50032

Known issues

  • The interrupted program does not resume its execution while debugging. It must be restarted using the mon reset halt command.

Available under certain Qt licenses.
Find out more.