Hi,
I have few queries regarding emWin booting in i.MXRT EVKB usig QSPI boot.
1. Has anybody tried flashing emWin GUI demo program to QSPI ?
I am using MCUXpresso . This IDE does not have spi flash driver only hyper flash is available.
2. Does any of the MCUXpresso latest release supports SPI flash driver ?
The MCUXpresso 10.2 doesnot have SPI flash driver support so I tried the FLASHLOADER to flash the emwin afx file to QSPI. But this got failed in the first step of converting the afx to bin file
elftosb.exe -f imx -V -c ../../bd_file/imx10xx/imx-flexspinor-normal-unsigned.bd -o gui.bin emwin.afx
Also I tried the below step.
Made XIP_EXTERNAL_FLASH=1 ,XIP_BOOT_HEADER_ENABLE=1 and XIP_BOOT_HEADER_DCD_ENABLE=0
and changed the code under evkbimxrt1050_flexspi_nor_config.c to
#include "evkbimxrt1050_flexspi_nor_config.h"
/*******************************************************************************
* Code
******************************************************************************/
#if defined(XIP_BOOT_HEADER_ENABLE) && (XIP_BOOT_HEADER_ENABLE == 1)
#if defined(__CC_ARM) || defined(__GNUC__)
__attribute__((section(".boot_hdr.conf")))
#elif defined(__ICCARM__)
#pragma location = ".boot_hdr.conf"
#endif
const flexspi_nor_config_t qspiflash_config = {
.memConfig =
{
.tag = FLEXSPI_CFG_BLK_TAG,
.version = FLEXSPI_CFG_BLK_VERSION,
.readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromDqsPad,
.csHoldTime = 3u,
.csSetupTime = 3u,
.columnAddressWidth = 0u,
.configCmdEnable = 0u,
// Enable DDR mode, Wordaddassable, Safe configuration, Differential clock
.controllerMiscOption = 0u,
.deviceType = kFlexSpiDeviceType_SerialNOR,
.sflashPadType = kSerialFlash_4Pads,
.serialClkFreq = kFlexSpiSerialClk_133MHz,
.lutCustomSeqEnable = 0u,
.sflashA1Size = 0x00800000u, /*8 MB/64 Mbit */
.dataValidTime = {16u, 16u},
.lookupTable =
{
// Read LUTs
[0] = FLEXSPI_LUT_SEQ(CMD_DDR, FLEXSPI_1PAD, 0xEB, RADDR_DDR, FLEXSPI_4PAD, 0x18),
[1] = FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x02),
[2] = FLEXSPI_LUT_SEQ(STOP,0,0,STOP,0,0),
[3] = FLEXSPI_LUT_SEQ(STOP,0,0,STOP,0,0),
},
},
};
#endif /* XIP_BOOT_HEADER_ENABLE */
After buildinf the afx file . The FLASHLOADER process was succesful and the image flashed to QSPI but there was no positive result .
MCUXpresso IDE v10.2.0 does ship with a flash driver compatible with the QSPI device fitted to the i.MX RT1050 EVK(B) board, which can be used to program and debug from QSPI flash (after you have made the appropriate modifications to the EVK board). The flash driver is call: MIMXRT1050-EVK_IS25WP064A.cfx
[ This is mentioned in the release notes at MCUXpresso IDE v10.2.0 Now Available, with more details in section 14.2.3 "i.MX RT QSPI and Hyper Flash Drivers" in the MCUXpresso IDE v10.2 User Guide.]
You will need to use the IDE's memory configuration editor to modify your project so as to select this flash driver instead of the default, Hyperflash driver.
In addition, you will also need to replace the file "evkbimxrt1050_flexspi_nor_config.c" in the xip folder, with one suitable for the QSPI device. The easiest way to do this is to download the SDK package for the i.MX RT1020 EVK from mcuxpresso.nxp.com, and extract the file "evkmimxrt1020_flexspi_nor_config.c" (plus the corresponding .h file) and put this into your i.MX RT1050 EVK(B) project's "xip" folder.
Regards,
MCUXpresso IDE Support
Thanks for the tip on the i.MXRT1020 EVK nor configuration file. That fixed my connection problem with MCUXpresso (my home-brew QSPI flash driver operating at 50 MHz always failed on programming, although I could erase).
Hi,
In MCUXpresso's "Post Build Steps" configuration options, uncomment the .axf to .bin conversion utility to generate a .bin file directly from MCUXpresso:
arm-none-eabi-objcopy -v -O binary "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin"
MfgTool can directly use this .bin file (called boot_image.bin or whatever you call it in your MfgTool .xml configuration) without having to go the "elftosb" route (which can crash when trying to perform non-XiP code relocation BTW).
IMPORTANT! Make sure your QSPI memory region points to 0x60000000! If not, the IVT region in the linker doesn't get kept (that was fun to track down).
Good luck,
Scott Thompson, TC Helicon
Hello Anjalik Krishna,
Have your read this AN about " How to Enable Boot from QSPI Flash " :
https://www.nxp.com/docs/en/application-note/AN12108.pdf
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Alice ,
I have already gone through the document and the hello world QSPI flashing is successful. My question is about the emWin application flashing to QSPI. The same process of flashing for hello world is not working for emWin GUI Demo application.
Whether emWin applications has different procedure for QSPI flashing?
I have no other choice but to use McuXpresso. Unfortunately all the documents are for iAR IDE
Thanks & Regards,
Anjali