IMX1189 Boot from QSPI (Non XIP)

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

IMX1189 Boot from QSPI (Non XIP)

2,818 Views
JM3
Contributor I

Hello,

We have been trying to boot from the QSPI flash of the EVK (IMXRT1180) and copy in to the internal RAM but have not been able. We are working with the MCUExpresso IDE and with the Secure provisioning tool. I´m working with the most simple project that I could find in the SDK example: rled_blinky_cm33.

The project is set to work with XIP, but as I do not want it, I have set it XIP_EXTERNAL_FLASH=0, and XIP_BOOT_HEADER_ENABLE=0. Also I selected the option Link application to RAM. To be safe, I deleted the flash from the memory map.

I can debug the binary in the MCUExpresso but I want to flash it to the QSPI and boot from it.

I know the following application note but is not for MCUExprreso: AN14589: Boot the i.MX RT1180 and Test the Boot Time from Different Devices | NXP Semiconductors

I have tried with the GUI flash tool but as it doesn´t exist any flash it does not work.

I have tried with the Secure Provisioning tool and it states that the image is non XIP, I have configured the correct flash and I can connect to the device and it doesn´t work. The RAM offset seems right, in the 0x0ff memory section (internal RAM, ITC).

The flash is correct, but then I change the SW5 to 0100 position to boot from QSPI and reboot the device, and I cannot see the light blinking.

I have tried with the same Secure Provisioning tool settings to flash the example provided in the Secure Provisioning tool (_inRAM.s19) and it works, so the issue is with the binary generated from MCUexpresso, what are the settings to create a non-XIP image?

Thanks a lot!

 

 

Labels (1)
0 Kudos
Reply
4 Replies

2,650 Views
JM3
Contributor I

If anyone has problems regarding this I have been able to solve it. If it not the correct way of solving it, please correct me.

There is an error in the linker in MCUXpresso IDE. It is noted down here: Processor-specific workflows — Secure Provisioning Tool 25.09 (but only for internal RAM). The problem also persist with HyperRAM for example. The linker, by default, creates some bss/data sections in HyperRAM, but it is no correctly calculated and when doing the bss_init/data_init it goes to hardfault. You need to change the default Global data placement to another memory region that is not the default. I have attached the configuration that worked for me.

Also, you need to have the correct setting for XMCD in MCUBootUtility. For this, I did use the example S19 provided in the Secure Provisioning for HyperRAM to check if the XMCD config is correct. Then change S19 with the AXF generated by your application.

0 Kudos
Reply

2,674 Views
JM3
Contributor I

Also, this is my first to set, but what I´m really interested is to execute from the HyperRAM (flexSPI2).

I have also followed the steps provided here: Processor-specific workflows — Secure Provisioning Tool 25.09 and have not been able also. But with the S19 provided in the secure provisioning tool (evkmimxrt1180_rgpio_led_output_cm33_HyperRAM.s19) it´s working. How is that S19 generated? 

0 Kudos
Reply

2,755 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

It is not necessary to modify XIP_EXTERNAL_FLASH, and XIP_BOOT_HEADER_ENABLE, they keep the value for non-XIP image.

For more details please refer to this document: How to Enable Non-XIP Boot on i.MX RT Series EVK

BR,
Omar

0 Kudos
Reply

2,696 Views
JM3
Contributor I

Hello,

Thanks for the response.

I have followed the steps, but could not make it work (I´m working with the cortex M33 core). I have attached the project.

When I try to debug, it seems that is working but it does not work correctly: no debug context, breakpoints do not work and it goes to hard fault.

I have been trying to solve this problem for a week and I cannot understand what is going wrong.

It seems that it is flashing to the QSPI correctly seeing the logs in the MCUBootUtility.

I have also tried with the secure provisioning tool with the same results.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2188242%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EIMX1189%20Boot%20from%20QSPI%20(Non%20XIP)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2188242%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%3CSPAN%3EWe%20have%20been%20trying%20to%20boot%20from%20the%20QSPI%20flash%20of%20the%20EVK%20(IMXRT1180)%20and%20copy%20in%20to%20the%20internal%20RAM%20but%20have%20not%20been%20able.%20We%20are%20working%20with%20the%20MCUExpresso%20IDE%20and%20with%20the%20Secure%20provisioning%20tool.%20I%C2%B4m%20working%20with%20the%20most%20simple%20project%20that%20I%20could%20find%20in%20the%20SDK%20example%3A%26nbsp%3Brled_blinky_cm33.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThe%20project%20is%20set%20to%20work%20with%20XIP%2C%20but%20as%20I%20do%20not%20want%20it%2C%20I%20have%20set%20it%26nbsp%3BXIP_EXTERNAL_FLASH%3D0%2C%20and%26nbsp%3BXIP_BOOT_HEADER_ENABLE%3D0.%20Also%20I%20selected%20the%20option%20Link%20application%20to%20RAM.%20To%20be%20safe%2C%20I%20deleted%20the%20flash%20from%20the%20memory%20map.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20can%20debug%20the%20binary%20in%20the%20MCUExpresso%20but%20I%20want%20to%20flash%20it%20to%20the%20QSPI%20and%20boot%20from%20it.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20know%20the%20following%20application%20note%20but%20is%20not%20for%20MCUExprreso%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.nxp.com%2Fbundle%2FAN14589%2Fpage%2Ftopics%2Fboot_from_flexspi_nand_flash.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EAN14589%3A%20Boot%20the%20i.MX%20RT1180%20and%20Test%20the%20Boot%20Time%20from%20Different%20Devices%20%7C%20NXP%20Semiconductors%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20have%20tried%20with%20the%20GUI%20flash%20tool%20but%20as%20it%20doesn%C2%B4t%20exist%20any%20flash%20it%20does%20not%20work.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20have%20tried%20with%20the%20Secure%20Provisioning%20tool%20and%20it%20states%20that%20the%20image%20is%20non%20XIP%2C%20I%20have%20configured%20the%20correct%20flash%20and%20I%20can%20connect%20to%20the%20device%20and%20it%20doesn%C2%B4t%20work.%20The%20RAM%20offset%20seems%20right%2C%20in%20the%200x0ff%20memory%20section%20(internal%20RAM%2C%20ITC).%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThe%20flash%20is%20correct%2C%20but%20then%20I%20change%20the%20SW5%20to%200100%20position%20to%20boot%20from%20QSPI%20and%20reboot%20the%20device%2C%20and%20I%20cannot%20see%20the%20light%20blinking.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20have%20tried%20with%20the%20same%20Secure%20Provisioning%20tool%20settings%20to%20flash%20the%20example%20provided%20in%20the%20Secure%20Provisioning%20tool%20(_inRAM.s19)%20and%20it%20works%2C%20so%20the%20issue%20is%20with%20the%20binary%20generated%20from%20MCUexpresso%2C%20what%20are%20the%20settings%20to%20create%20a%20non-XIP%20image%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThanks%20a%20lot!%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2188242%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MXRT%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2190626%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20IMX1189%20Boot%20from%20QSPI%20(Non%20XIP)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2190626%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIf%20anyone%20has%20problems%20regarding%20this%20I%20have%20been%20able%20to%20solve%20it.%20If%20it%20not%20the%20correct%20way%20of%20solving%20it%2C%26nbsp%3Bplease%20correct%20me.%3C%2FP%3E%3CP%3EThere%20is%20an%20error%20in%20the%20linker%20in%20MCUXpresso%20IDE.%20It%20is%20noted%20down%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.mcuxpresso.nxp.com%2Fsecure%2Flatest%2F06_processor_specific_workflow.html%23preparing-source-image-for-rt118x-devices%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EProcessor-specific%20workflows%20%E2%80%94%20Secure%20Provisioning%20Tool%2025.09%3C%2FA%3E%26nbsp%3B(but%20only%20for%20internal%20RAM).%20The%20problem%20also%20persist%20with%20HyperRAM%20for%20example.%20The%20linker%2C%20by%20default%2C%20creates%20some%20bss%2Fdata%20sections%20in%20HyperRAM%2C%20but%20it%20is%20no%20correctly%20calculated%20and%20when%20doing%20the%20bss_init%2Fdata_init%20it%20goes%20to%20hardfault.%20You%20need%20to%20change%20the%20default%20Global%20data%20placement%20to%20another%20memory%20region%20that%20is%20not%20the%20default.%20I%20have%20attached%20the%20configuration%20that%20worked%20for%20me.%3C%2FP%3E%3CP%3EAlso%2C%20you%20need%20to%20have%20the%20correct%20setting%20for%20XMCD%20in%20MCUBootUtility.%20For%20this%2C%20I%20did%20use%20the%20example%20S19%20provided%20in%20the%20Secure%20Provisioning%20for%20HyperRAM%20to%20check%20if%20the%20XMCD%20config%20is%20correct.%20Then%20change%20S19%20with%20the%20AXF%20generated%20by%20your%20application.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2190008%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20IMX1189%20Boot%20from%20QSPI%20(Non%20XIP)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2190008%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EAlso%2C%20this%20is%20my%20first%20to%20set%2C%20but%20what%20I%C2%B4m%20really%20interested%20is%20to%20execute%20from%20the%20HyperRAM%20(flexSPI2).%3C%2FP%3E%3CP%3EI%20have%20also%20followed%20the%20steps%20provided%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.mcuxpresso.nxp.com%2Fsecure%2Flatest%2F06_processor_specific_workflow.html%23preparing-source-image-for-rt10xx-rt116x-rt117x-devices%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EProcessor-specific%20workflows%20%E2%80%94%20Secure%20Provisioning%20Tool%2025.09%3C%2FA%3E%26nbsp%3Band%20have%20not%20been%20able%20also.%20But%20with%20the%20S19%20provided%20in%20the%20secure%20provisioning%20tool%20(evkmimxrt1180_rgpio_led_output_cm33_HyperRAM.s19)%20it%C2%B4s%20working.%20How%20is%20that%20S19%20generated%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2189762%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20IMX1189%20Boot%20from%20QSPI%20(Non%20XIP)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2189762%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EThanks%20for%20the%20response.%3C%2FP%3E%3CP%3EI%20have%20followed%20the%20steps%2C%20but%20could%20not%20make%20it%20work%20(I%C2%B4m%20working%20with%20the%20cortex%20M33%20core).%20I%20have%20attached%20the%20project.%3C%2FP%3E%3CP%3EWhen%20I%20try%20to%20debug%2C%20it%20seems%20that%20is%20working%20but%20it%20does%20not%20work%20correctly%3A%20no%20debug%20context%2C%20breakpoints%20do%20not%20work%20and%20it%20goes%20to%20hard%20fault.%3C%2FP%3E%3CP%3EI%20have%20been%20trying%20to%20solve%20this%20problem%20for%20a%20week%20and%20I%20cannot%20understand%20what%20is%20going%20wrong.%3C%2FP%3E%3CP%3EIt%20seems%20that%20it%20is%20flashing%20to%20the%20QSPI%20correctly%20seeing%20the%20logs%20in%20the%20MCUBootUtility.%3C%2FP%3E%3CP%3EI%20have%20also%20tried%20with%20the%20secure%20provisioning%20tool%20with%20the%20same%20results.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2189310%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20IMX1189%20Boot%20from%20QSPI%20(Non%20XIP)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2189310%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIt%20is%20not%20necessary%20to%20modify%20XIP_EXTERNAL_FLASH%2C%20and%20XIP_BOOT_HEADER_ENABLE%2C%20they%20keep%20the%20value%20for%20non-XIP%20image.%3C%2FP%3E%0A%3CP%3EFor%20more%20details%20please%20refer%20to%20this%20document%3A%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN14069.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EHow%20to%20Enable%20Non-XIP%20Boot%20on%20i.MX%20RT%20Series%20EVK%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EBR%2C%3CBR%20%2F%3EOmar%3C%2FP%3E%3C%2FLINGO-BODY%3E