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.

Run a flash target demo by UUU

This section describes the steps to use the UUU to build and run example applications provided in the MCUXpresso SDK. The hello_world demo application targeted for the i.MX 8M Plus EVK hardware platform is used as an example, although these steps can be applied to any example application in the MCUXpresso SDK.

Set up environment

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

Download the MfgTool

The Universal Upgrade Utility (UUU) is an upgraded version of MfgTool. It is a command line tool that aims at installing the bootloader to various storage including SD, QSPI, and so on, for i.MX series devices with ease.

The tool can be downloaded from github. Use version 1.3.134 or higher for full support for the M7 image. Download uuu.exe for Windows OS, or download UUU for Linux. Configure the path so that the executable can later be called anywhere in the command line.

Parent topic:Set up environment

Switch to Download Mode

The board needs to be in Download Mode mode for UUU to download images:

  1. Set the board boot mode to Download Mode [SW0001[1-4]].

  2. Connect the development platform to your PC via USB cable between the SERIAL port and the PC USB connector. The SERIAL port is J301 on the base board.

  3. The PC recognizes the i.MX 8M Plus device as (VID:PID)=(1FC9:0146), as shown in Figure 1.

    |

|

Parent topic:Set up environment

Parent topic:Run a flash target demo by UUU

Build an example application

The following steps guide you through opening the hello_world example application. These steps may change slightly for other example applications, as some of these applications may have additional layers of folders in their paths.

  1. If not already done, open the desired demo application workspace. Most example application workspace files can be located using the following path:

    <install_dir>/boards/<board_name>/<example_type>/<application_name>/iar
    

    Using the i.MX 8M Plus EVK board as an example, the workspace is located in:

    <install_dir>/boards/evkmimx8mp/demo_apps/hello_world/iar/hello_world.eww
    
  2. Select the desired build target from the drop-down. For this example, select hello_world – flash_debug.

    |

|

  1. To build the demo application, click Make, highlighted in red in Figure 2.

    |

|

  1. The build completes without errors.

  2. Copy it to the UUU tool directory.

Parent topic:Run a flash target demo by UUU

Run an example application

To download and run the application via UUU, perform these steps:

  1. Connect the development platform to your PC via USB cable between the J23 USB DEBUG connector and the PC. It provides console output while using UUU.

  2. Connect the J6 USB Type-C connector and the PC. It provides the data path for UUU.

  3. Open the terminal application on the PC, such as PuTTY or TeraTerm, and connect to the debug COM port (to determine the COM port number, see How to determine COM port). Configure the terminal with these settings:

    1. 115200 baud rate

    2. No parity

    3. 8 data bits

    4. 1 stop bit |

|

  1. Get the fspi version U-Boot image named imx-boot-imx8mpevk-fspi.bin-flash_evk_flexspi from the linux release package.

  2. In the command line, execute uuu to get script for qspi: uuu -bshow qspi > qspi_auto.sh.

    Then edit qspi_auto.sh, repleace this line:

    FB: ucmd if qspihdr dump ${fastboot_buffer}; then setenv qspihdr_exist yes; else setenv qspihdr_exist no; fi;

    with the below line:

    FB: ucmd setenv qspihdr_exist no |

  3. rename file imx-boot-imx8mpevk-fspi.bin-flash_evk_flexspi with _flexspi.bin,

    rename hello_world.bin with _image

  4. In the command line, execute uuu with the qspi_auto.sh:

    uuu qspi_auto.sh

    The UUU puts the platform into fast boot mode and automatically flashes the target bin to QSPI. The command line and fast boot console is as shown (run_an_example_application.md#COMMANDLINSEFASTBOOT).

    |

|

  1. Then, power off the board and change the boot mode to eMMC/SDHC3 [SW0010[1-4]], and power on the board again.

  2. Use following command in U-Boot to kickoff m7:

    sf probe
    sf read ${loadaddr} 0 4
    bootaux 0x8000000
    

Parent topic:Run a flash target demo by UUU