Program flash.bin to SD/eMMC with UUU

This section describes the steps to use the UUU to run the example applications provided in the MCUXpresso SDK. Download the flash.bin to emmc/sd with UUU. The hello_world demo application targeted for the i.MX 93 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 Universal Upgrade Utility

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 accessed from corresponding Linux BSP release. 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 for UUU to download images:

  1. Set the board boot mode to Download mode [SW5[1:4] = 1100].

  2. Connect the development platform to your PC via USB cable between the DBG USB connector (J26) and the PC USB connector.

  3. Connect J7 (USB1) to PC USB connector for downloading.

  4. The PC recognizes the i.MX 93 device as (VID:PID)=(1FC9:0146), as shown in Figure 1.

    |

|

Parent topic:Set up environment

Parent topic:Program flash.bin to SD/eMMC with 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 93 AUTO EVK board as an example, the workspace is located in:

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

  3. To build the demo application, click Make.

    |

|

  1. The build completes without errors.

Parent topic:Program flash.bin to SD/eMMC with 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 DBG USB connector (J26) and the PC. It provides console output while using UUU.

  2. Connect the J7 (USB1) 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 boot images and the imx-mkimage source repository from corresponding Linux BSP release. The boot images required to be put into imx-mkimage/i.MX9 are:

    - u-boot-imx93-14x14-lpddr4x-evk.bin-sd (rename to u-boot.bin)

    - u-boot-spl.bin-imx93-14x14-lpddr4x-evk-sd (rename to u-boot-spl.bin)

    - bl31-imx93.bin (rename to bl31.bin)

    - mx93a1-ahab-container.img

    - lpddr4_dmem_1d_v202201.bin

    - lpddr4_dmem_2d_v202201.bin

    - lpddr4_imem_1d_v202201.bin

    - lpddr4_imem_2d_v202201.bin

  2. Copy binary generated by IAR build into imx-mkimage/i.MX9, and rename it to m33_image.bin.

  3. Make flash.bin with imx-mkimage.

    make SOC=iMX9 REV=A1 flash_singleboot_m33 (for single boot mode)

    or

    make SOC=iMX9 REV=A1 flash_lpboot (for low power boot mode)

  4. Power on the board.

  5. Type the UUU command to the flash image.

    uuu -b emmc flash.bin (for single boot on eMMC)

    uuu -b sd flash.bin (for single boot on SD)

    For low power boot, a single boot flash.bin is needed besides the target flash.bin.

    uuu -b emmc <singleboot flash.bin> flash.bin (for lowpower boot on eMMC)

    uuu -b sd <singleboot flash.bin> flash.bin (for lowpower boot on SD)

    The UUU puts the platform into fast boot mode and automatically flashes the target bootloader to emmc/sd. The command line and fast boot console is as shown in Figure 2.

    |

|

  1. Then, power off the board and change the boot mode to the corresponding one.

    • For single-boot mode:

      • when boot device is emmc, then SW5[1:4] = 0100;

      • when boot device is sd, then SW5[1:4] = 0010.

    • For low-power boot mode:

      • when boot device is emmc, then SW5[1:4] = 0001;

      • when boot device is sd, then SW5[1:4] = 0101.

  2. Power on the board again.

Parent topic:Program flash.bin to SD/eMMC with UUU