Program bootable image

Bootable image programming is supported by MfgTool only.

MfgTool

The MfgTool supports i.MX RT BootROM and MCUBOOT-based Flashloader. It can be used in factory production environment. The MfgTool can detect i.MX RT BootROM devices connected to a PC and invokes “blhost” to program the image on target memory devices connected to the i.MX RT device.

The template of MfgTool configuration profile is provided along with this document. It is applicable to most use cases without any modifications.

MfgTool Directory structure

MfgTool organization

  1. In the release package, the mfgtools-rel folder appears in the tools folder along with blhost folder.

  2. The blhost.exe appears in the blhost/win folder and the MfgTools executable “MfgTool2.exe”.

  3. The Profiles folder contains the profile for the supported devices that include an “OS Firmware” folder and player.ini file.

  4. The ucl2.xml file in the OS Firmware folder is the main .xml file that MfgTool processes. It contains the manufacturing process flow for the device. The process includes identification parameters for the device and blhost commands parameter to identify the device connected to the PC host and a set of blhost commands required for updating the image. The ucl2.xml file can be customized to suit custom setup or manufacturing process flow. The folder contains example XML files for user’s reference. An example ucl2.xml is shown below. In general, it defines the supported states and lists.

Example UCL2.xml settings

  1. The “ivt_flashloader.bin” file under the “OS firmware” is the Flashloader released to support image programming.

  2. The “ivt_flashloader_signed.bin” file under the “OS firmware” is the bootable Flashloader image file generated by users for Secure Boot solution in production phase, it can be generated by following Section 4.3.

  3. The “boot_image.sb” file under the “OS firmware” is the wrapped file with command sequences and bootable images generated by the users using the elftosb utility.

  4. The “enable_hab.sb” file under the “OS firmware” is the wrapped file with command sequences that programs Fuses to enable HAB closed mode, which is generated by the users using the elftosb utility.

  5. The play.ini in the “Device” profile folder contains configurable parameters for the manufacturing tool application.

  6. The cfg.ini and UICfg.ini files provide customizable parameters for the look and feel of the tool’s GUI. The cfg.ini in tool’s GUI is used to select “chip”, “platform” and “name” in list. Refer to the example below

    Note: Select appropriate “chip” from Device list, “name” from list in ucl2.xml in Device/OS Firmware folder.

    [profiles]
    chip = MXRT105X
    [platform]
    board =
    [LIST]
    name = MXRT105X-DevBoot
    
  7. UlCfg.ini is used to select the number of instances supported by MfgTool UI. The valid instance range is 1-4.

  8. The MfgTool.log text file is a useful tool to debug failures reported on MfgTool UI. The MfgTool logs the entire command line string which was used to invoke blhost and collects the output response text the blhost puts out on stdout into the MfgTool log file. The log file should be the considered first while troubleshooting.

Preparation before image programming using MfgTool

See Chapter 4, Generate i.MX RT bootable image and Chapter 5, Generate SB file for bootable image programming for more details.

Connect to the i.MX RT Platform

The i.MX RT platform connects to a host computer to interface with the i.MX RT BootROM application. After the platform connects in serial downloader mode, use the MfgTool to program bootable image into the target flash memory. If both cfg.ini and UlCfg.ini files are configured appropriately, MfgTool recognizes the device and establishes the connection.

The figure below shows that the MfgTool has been connected.

MfgTool GUI with device connected

Program bootable image during development

In development phase, the device may be in HAB open mode for most use cases. Users can configure the “name” field in cfg.ini file as <Device>-DevBoot, then prepare the boot_image.sb file using the elftosb utility. After the “boot_image.sb” is generated, place it into “<Device>/OS Firmware/” folder. Then put device into serial downloader mode and connect it to host PC. After opening the MfgTool2.exe and click “Start” to trigger a programming sequence. When the programming completes, the window shown in the figure below appears. To exit MfgTool, click “Stop” and then “Exit”.

Successful result for programming with MfgTool for DevBoot

Program bootable image for production

In production phase, the device can be in HAB closed mode for most use cases. Users can configure the “name” field in cfg.ini file as <Device>-SecureBoot, then prepare the boot_image.sb file, enable_hab.sb and ivt_flashloader_signed.bin using the elftosb utility. After all are generated, place them into “<Device>/OS Firmware/” folder, then put device in serial downloader, connect it to host PC. Open MfgTool2.exe and click “Start” to trigger a programming sequence. After the programming completes, the window below will be seen. To exit MfgTool, click “Stop” and then “Exit”.

Successful result for programming with MfgTool for Secure Boot