Hi @alanlow
I have only experience from the iMX7ULP, but I guess the process is similar.
On page 11 in the "Getting started with MCU Expressor for evk imx7ulp" under point 7:
Getting Started with MCUXpresso SDK for EVK-MCIMX7ULP
The text is providing the following information:
7. Power on the board and hit any key to stop autoboot in the terminals, then enter to U-Boot command-line mode. You can then write the image and run it from QSPI Flash with the following commands (Assume that image size is less than 0x20000, otherwise the sf erase and write command size parameter must be enlarged. If the image size is bigger than 0x20000 (128 kB), change 0x20000 to a number larger or equal to the image size.):
The following are the commands to load the image for the M4 processor:
sf probe.
sf erase 0x0 0x20000
fatload mmc 0:1 0x62000000 sdk20-app.img
sf write 0x62000000 0x0 0x20000.
I would interpretate the last line such that the image is written to the memory location starting at 0x62000000. I guess that it must be something similar for the iMX8?