AnsweredAssumed Answered

How to i.MXRT1051 QSPI Boot w/o XIP (Reside in Flash, Run from TCM)

Question asked by Scott Thompson on Jun 11, 2018
Latest reply on Jun 22, 2020 by venu gopal

I'm using MCUXpresso IDE to create a sample Hello World (VCP) application.  I can run it from MCUXpresso fine and debug in RAM and have verified the application runs okay.  I even can run it from Hyperflash and have it persistent, but our project will be using QSPI NOR flash and I'm trying to configure for this mode (which I know I have to use the Kinetis flashloader and NOT MCUXpresso).


I have set my project to start at 0x60002000 per the linker configuration for the application start point and got the MfgTool to successfully program a resulting into the FlexSPI on the modified i.MXRT1052-EVKB board.  However, my application didn't run, and subsequent attempts to program the QSPI with the MfgTool fails.


My end goal is currently NOT to run using XIP.  Due to hardware issues on the first revision, our dead-bugged NOR flash device is a x1 configuration and will not be able to do XIP, so I want to use the ROM bootloader to load the image to RAM (our product will have SDRAM as well but running from TCM is preferred).  However, whenever I try to configure an image to run from RAM (anything but 0x60002000 for an address) the 'elftosb' tool crashes.


The project settings that I had when I got the MfgTool to work were:





Under Project Settings -> Memory, I have:

BOARD_FLASH   0x60002000 with a size of 0x3FFE000 and a driver of MIMXRT1050-EVK_IS25WP064A.cfx

SRAM_DTC         0x20000000 with a size of 0x20000

SRAM_ITC            0x0 with a size of 0x2000

SRAM_OC            0x20200000 with a size of 0x40000

BOARD_SDRAM   0x80000000 with a size of 0x2000000


Again, since I'm trying to mimic what our final product will be to have our application image in FlexSPI NOR (x1) (but using the EVKB's QSPI device), I'm trying to flash and load a program that resides in QSPI but will ultimately execute from RAM.  


However, after the first successful programming (but failure to launch the code--maybe I used the padded version instead of the non-padded .bin file by mistake) I can no longer get ANY image to load on FlexSPI using the serial bootloader and MfgTool. 


Also, every time I try and specify to NOT use XIP (various means, most are likely wrong--I'm trying to figure this out), the 'elftosb' tool, when creating the first .bin iMX boot image .bin file, always crashes.


Any thoughts on getting a FlexSPI NOR flash to work with MfgTool, built from MCUXpresso, without using XIP?


Thanks for any insight.  I've been drilling through the rest of the community comments and code and haven't found exactly what I'm looking for yet...



Scott Thompson, TC Helicon