The QuadSPI bootloader found in the MQX installation folder needs an SD card that contains the images to load in iRAM or DDR. This means that the bootloader does not flash the application in QSPI memory, and using this bootloader in the field implies the need of an SD card every time the application needs to restart.
NOTE:
This document uses as reference MQX 4.1.1
The attached project is a modified bootloader_vybrid_qspixip project that works in the next way:
The next figures show an example of the implementation.
The BootROM code loads the MQX Bootloader from QuadSPI in iRAM. When the MQX Bootloader starts, it checks if there is a mounted SD. If the SD contains valid application binary files and a valid configuration file it flash the images into the SD.
To get this behavior a simple change in the QuadSPI driver from the BSP is required. In the file qspi_quadspi.c file of the BSP change line 898 to this:
quadspi_reg_ptr->BUF3CR = (quadspi_reg_ptr->BUF3CR & ~QuadSPI_BUF3CR_ADATSZ_MASK) | QuadSPI_BUF3CR_ADATSZ(128); /* AHB prefetch size: 128*8byte */
The attached file contains the modified files that have to be used in the MQX bootloader_vybrid_qspixip project.