RT1050 QSPI to internal RAM

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

RT1050 QSPI to internal RAM

3,535 次查看
giuseppescarpi
Contributor III

Currently, I am attempting to store code in the external QSPI and to execute it in internal RAM.

With MCUXpresso, this should be quite easy. You prepare a firmware stored in flash (XIP_EXTERNAL_FLASH=1 and XIP_BOOT_HEADER_ENABLE=1), and you set Plain Load Image flag with the desider memory area (SRAM_OC in my case).

Nonetheless, the operation does not work. After loading the firmware, I get a SIGTRAP at address 0xDEADBEEE.

Note that I read various threads on the forum, but I was unable to find a final solution.

Also note that I am using JLink on the JTAG/SWD port to program and debug the device.

Finally, the firmware runs with no problem as XIP.

Thanks in advance for any help!

Giuseppe

标签 (1)
标记 (1)
6 回复数

2,666 次查看
venugopal_v
Contributor III

hello, i had requirement to store data as well program in same QSPI flash with  imx rt 1050 i followed above process with different method that is through linker scrips to relocate  all flexspi code to ITC ram . hope this would help

Dropbox - BEL2_flexspi_nor_polling_transfer.7z - Simplify your life 

0 项奖励
回复

2,666 次查看
jay_heng
NXP Employee
NXP Employee

You can also try this tool, with this tool, You can flash bare image into various boot devices easily and don't need to care about headers (ivt, boot data...)

GitHub - JayHeng/nxp-sec-boot-ui: A one-stop GUI tool to work with NXP MCU (Kinetis, i.MXRT, LPC) RO... 

0 项奖励
回复

2,666 次查看
CarlosCasillas
NXP Employee
NXP Employee

Hi Giuseppe,
You could also refer to the following Community document, which provides information regarding booting from Flash, copying the application to RAM and then running from RAM:

RT1050 - Booting from serial NOR flash to SDRAM 


Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

2,666 次查看
sverre_agesen
Contributor I

This should definitely be possible. The Rom bootloader is extremely flexible and versatile.
In one of the i.MX RT courses I attended I saw with my own eyes that this thing you ask for is possible. Unfortunately it wasn't of direct interest to me and so I didn't go into it in depth. However the hands on only involved the use of command line tools, and, if I remember correctly, the bootloader was "instructed" to copy the entire binary image into the OCRAM using only a few values in DCD and IVT (I don't remember if one or both). I remember, however, that the FAE placed a lot of emphasis on the fact that, by doing so, absolutely no instruction was executed from the external flash. Everything was moved and used in RAM: .text code, interrupt vectors, .data, .rodata, etc. Not function by function, but the entire binary image of the program. Obviously the linker script has to take this into account and in fact the flash memory area does not appear either. They tried hyperflash, but FAE said that for QSPI the concepts were completely identical.

I hope that this will help you

Best regards

Sverre

0 项奖励
回复

2,666 次查看
giuseppescarpi
Contributor III

Hi Sverre, thank you for your answer.

Last Friday our FAE in Italy also confirmed that there is somewhere a hands-on document describing how to do so. As soon as I have more info, I'll post them here for reference.

Also, according to this thread

Relocating majority of application into RAM 

there is an error in the MCUXpresso user guide, chapter 16.13.1. By correcting the custom scripts, I was able to relocate the majority of the code. But, in facts, I need to run everything in RAM, including vector table!

BR

Giuseppe

2,666 次查看
giuseppescarpi
Contributor III

Update: I was able to relocate some functions in OC_RAM by using the guidelines in the MCUXpresso manual.

Nonetheless, I need to relocate all the code to RAM. Following the under 16.13.1 of the guide (" Relocating majority of application into RAM ") still results in a 0xDEADBEE error.

0 项奖励
回复