I am trying to get the MIMXRT1020 running the flashloader program from the SDK on Keil. Ultimately, I would like to modify this program to accept commands and data from the SPI pins instead of UART or USB on the MIMXRT1024. The Arm Keil pack for the MIMXRT1024 has not been released yet so I will be working with the 1020 first. To reach this goal, I envision breaking this task into smaller tasks outlined below:
When I set the pins on SW8[3:4] to 0 and 1 and plug in the EVK board, I am able to see the board on usb using the NXP-MCU Boot Utility 3.1.0 obtained from https://github.com/JayHeng/NXP-MCUBootUtility
Looking at the scatter file for the MIMXRT1020 flashloader program, I see that the program is getting copied into RAM and executed from RAM instead of copied into flash then to ram after reset before executing.
I have checked the SDK for examples for the 1020, 1024 and 1052. All three seem to be directly loaded to ram in the example. Also, the 1052 is listed on https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcuboot-mcu-... as having SPI detection but sadly after looking through the code I was unable to find SPI being initialized or used.
I also found this for moving my code: https://stackoverflow.com/questions/62266941/relocation-of-data-from-flash-to-ram-during-boot-phase . The concept seems simple enough but I know implementing it for the first time may be a bit of a hurdle.
I am also planning on devoting more time to read the ARM linker document and see what gotchas apply when using Keil.
Does anyone know of any NXP MCU Bootloader examples that hopefully run from internal/external flash and/or use SPI as a peripheral? That and hopefully a suggestion where to focus my attention to read to better learn how to utilize this example.