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:
Run flashloader from address 0x60002400
Flash the blink project to MCU and launch it via USB
Repeat flashing the blink project but using UART via FTDI chip (already got UART working)
Add code to copy flashloader to RAM and initialize it identically to the scatter file provided. Specifically, interrupts from 0x2020a000-0x2020a400, program code from 0x2020a800-0x2022000, and stack from 0x20000000-0x20010000 growing down.
Using MCU-Boot for another NXP MCU as a reference, initialize SPI_1 and verify proper functionality.
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 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.