
If you are not familiar with the MCUXpresso IDE yet, see
docs/Getting Started with MCUXpresso SDK for <your_board>.pdf
("Build
an example application" section).
4.2 Build configurations
debug_ram
This configuration is targeted to be executed from the RAM memory. Thus, some safety tests must be turned off because the ROM
memory is not used (turn on/off a particular test in the beginning of the "
safety_config.h
" file).
1. Turn off the flash test, program counter test, and watchdog test.
2. Build the project (F7).
3. Download and debug (Ctrl+D).
4. Press F5 to run.
5. Check the terminal output: "Hello safety world!".
debug_flash
This configuration is targeted to be executed from the ROM memory. All safety tests can be turned on at the beginning of the
safety_config.h
file.
The flash loader is not supported for the Nano device in the IAR IDE. Thus, the UUU tool must be used to download the binary
image into the ROM QSPI memory. The following steps are required to download the image to the ROM memory:
• Set the device to the download mode: switch SW1101 to value "1000".
• Setup the bootloader: check the Device Manager. Two new COM ports should appear. Open both COM ports in the serial
terminal (with settings mentioned above). The COM port with the higher number shows the output of the bootloader. The
other COM port shows the output of the application.
• Open the Windows OS command prompt and change the directory to
<PACKAGE_DIR>\example\boards\<your_board>\demo_apps\safety_iec60730b\iar\
.
• Run the "uuu -b emmc uboot_emmc.bin" command and wait a few seconds. The output of the bootloader terminal should
look as follows:
MMC write: dev # 1, block # 0, count 2764 ... 2764 blocks written: OK
Writing 'bootloader' DONE!
Detect USB boot. Will enter fastboot mode!
Detect USB boot. Will enter fastboot mode!
• Turn off the board (SW101).
• Set the device to boot from eMMC:
— i.MX8M Mini: switch SW1101 to value "01110010" and SW1102 to value "00101010".
— i.MX8M Nano: switch SW1101 to value "0100".
• Turn on the board (SW101).
• Open the bootloader terminal and wait a few seconds. When "u-boot=> " appears, run the following commands in a sequence:
env set -f bootcmd "mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript;
then run bootscript; else if run loadimage; then run mmcboot; else sf probe; bootaux
0x8000000;; fi; fi; else booti ${loadaddr} - ${fdt_addr}; fi"
Build configurations
i.MX8M Safety Example , Rev. 3, 07/2021
NXP Semiconductors
11