QSPI Flash Programming Problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

QSPI Flash Programming Problem

1,785 Views
gh78731
Contributor III

Environment:

Windows 10 Pro
MCUXpresso IDE v11.2.0_4120
SEGGER J-Link V6.82d
MIMXRT1052CVL5B with QPSI Flash, IS25WP064A-JBLE (No Hyperflash)

JLinkDevices.xml has been edited to use “NXP_iMXRT105x_QSPI.elf”

I want to boot from the QSPI, and execute from RAM for maximum program performance.

The J-Link will load the program image directly into internal RAM, and the debugger works as expected.

I have successfully erased the QPSI flash using the “GUI Flash Tool.”

But, if I use the MCUXpresso IDE "GUI Flash Tool”, to load a “.hex” file I get:


(a good connection to the M7) ...
Writing target memory failed.
Script processing completed.
Unable to perform operation!
Command failed with exit code 1

Is there some configuration thing I am missing? Wrong driver? Where do I look?

Does AN12108 still apply?
Do I need to go through this process to create and load a working bootable image into Flash

Or, do the latest versions of MCUExpresso IDE and J-Link allow me to load a bootable program image into external Flash?

Would switching to a LPC-Link2 make any difference ? (None available anywhere)

Thanks, --- Graham

Labels (1)
0 Kudos
3 Replies

1,665 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Graham Haddock ,

   RT1050 JLINK xml file in default is using the hyper flash.

   So, you modify it to the QSPI flash is correct.

   I have a question, do you try to use the JLINK commander to do the qspi flash write and erase, whether it is a success or not?

   You can try it on your side, as I know, the JLINK commander also uses the XML file, which the MCUXPresso IDE will use it.

   If the JLINK commander can do the erase, write successfully, then the MCUXPresso IDE should also can do it.

   But if the JLINK commander has issues, then I think the external IDE call the related files also have issues.

   In fact, recently, I find the new JLINK drivers JLINK commander seems have issues to process the RT1050 QSPI function, but in the older JLINK drivers, eg. v6.62a, it has no issues.

Wish it helps you!

If you still have questions about it, please kindly let me know.

Best Regards,

Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,665 Views
gh78731
Contributor III

Hi kerryzhou:

Thank you for your response.

I will try the manual operation from the JLink Commander as you suggest, but have not done so, yet.

If I am able to obtain "LPC Link 2", should I expect it to be able to install bootable code image on external QSPI flash from MPUXpresso?

If I want the program to boot from QSPI, but execute from RAM, what is the correct setting for the Preprocessor Flags?

Is it as simple as setting all XIP_xxx_ENABLE flags to '0' ?

Is there some other configuration I need to do?

Is execute from RAM the default condition?

If it is easier to point me to documentation, rather than explain in forum, please do so.

Thanks, --- Graham

==

0 Kudos

1,665 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Graham Haddock,

  You are welcome!

  1. LPC Link 2 can be firmware with CMSIS DAP or the JLINK, so I think even the JLINK driver have issues, you also can use the CMSIS DAP to download the code to your external qspi flash.

    Please don't worry, it is not the big issue.

  2. If I want the program to boot from QSPI, but execute from RAM, what is the correct setting for the Preprocessor   Flags?

  Answer: just select link application to RAM is OK

pastedImage_1.png

Then the code location will in the RAM, when you download the code, you can use the external tool to download the code to the QSPI flash, eg. MCUBootUtility:

https://github.com/JayHeng/NXP-MCUBootUtility/archive/v2.3.0.zip
the related user manual is:
https://github.com/JayHeng/NXP-MCUBootUtility

 Secure Provisioning Tools:

MCUXpresso Secure Provisioning Tool | Software Development for NXP Microcontrollers (MCUs) | NXP | N... 

or the flashloader with the MFGtool

  You can find it in the SDK middleware mcu-boot area.

 3 Is it as simple as setting all XIP_xxx_ENABLE flags to '0' ?

   Answer: No, refer to item 2.

 4 Is there some other configuration I need to do?

  Answer: No, refer to item2.

 5 Is execute from RAM the default condition?

 Answer: After you generate the RAM code, then when you download the code to the QSPI flash, the ROM will copy it to the RAM, and execute the code from RAM.

 6 If it is easier to point me to documentation, rather than explain in forum, please do so.

 Answer: After you generate the RAM app code, you totally can use the tools to download it. I prefer to use the MCUbootUtility, it is very easy to use, and it is designed by our RT AE.

Wish it helps you!

If you still have questions about it, please kindly let me know.

Best Regards,

Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------