i.MX RT1010 Bootloader / Flashloader

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

i.MX RT1010 Bootloader / Flashloader

1,980 Views
carotte
Contributor IV

Hi,

I’ve been looking into bootloaders / flashloaders for the i.MX RT1010.

I’ve read the relevant NXP application notes (AN12604, AN12238, etc.), but I find the documentation quite fragmented, and most of it appears to be targeted at the higher-end devices in the RT10xx family.

What I’m missing is a high-level overview, as well as a simple guide for a minimal, practical setup.

From what I understand so far, the RT1010 ROM bootloader (accessed from the host via sdphost) can only load code into RAM. To program the external FlexSPI flash, a temporary flashloader must first be downloaded into RAM via this mechanism. This flashloader then performs the actual flash programming, typically in conjunction with blhost on the host side.

When using the Secure Provisioning Tool, it appears that a prebuilt flashloader binary is used internally for this purpose.

I’ve seen the terms KBOOT and MCUboot mentioned in this context, but it’s not clear to me whether the latter refers to an NXP-specific component or to the open-source MCUboot project from Trusted Firmware (https://www.trustedfirmware.org).

I also looked at the SDK example bootloader_examples/flashloader, which unfortunately is very poorly documented. From experimenting with it, it seems to perform the same role as the prebuilt flashloader used by the Secure Provisioning Tool: once it has been programmed, I can use the tool to flash an application image without first loading the prebuilt flashloader.

For an actual product, however, it seems that the intended approach would be to have a persistent flash-resident bootloader in external flash. The SDK flashloader example, as provided, does not appear to implement this.

So my questions are:

  • Is my general understanding of the RT1010 boot / flashloader flow correct?

  • If so, how is a persistent flash-resident bootloader typically implemented on RT1010?

  • What changes are required on the application side (linker settings, vector table relocation, etc.) to work in conjunction with such a bootloader?

In previous PIC-based projects, I could include a precompiled bootloader as an “extra loadable” alongside the main application. I assume a conceptually similar approach is required here, but implemented differently.

Any guidance or clarification would be highly appreciated.

Labels (1)
0 Kudos
Reply
4 Replies

1,401 Views
Pablo_Ramos
NXP Employee
NXP Employee

Hi,

Did the information shared in the thread help you understand the bootloaders/flashloaders for the i.MX RT1010, or do you still have any questions?

Best Regards,
Pablo

0 Kudos
Reply

1,359 Views
davenadler
Senior Contributor II

@Pablo_Ramos - What are you talking about?
NXP has completely failed to answer any of the questions asked above.

0 Kudos
Reply

1,774 Views
davenadler
Senior Contributor II

FYI, because of issues with the NXP-provided bootloader, I used Mark's utasker-based bootloader mentioned below (on RT1024). Great support and it works well for my application. Use case here is bootloading from USB stick into RT1024 internal flash with full security (encrypted distribution loaded into further-encrypted XIP internal flash).
Hope that helps!
Best Regards, Dave

 

0 Kudos
Reply

1,916 Views
mjbcswitzerland
Specialist V
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2303118%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ei.MX%20RT1010%20Bootloader%20%2F%20Flashloader%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2303118%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%E2%80%99ve%20been%20looking%20into%20bootloaders%20%2F%20flashloaders%20for%20the%20i.MX%20RT1010.%3C%2FP%3E%3CP%3EI%E2%80%99ve%20read%20the%20relevant%20NXP%20application%20notes%20(AN12604%2C%20AN12238%2C%20etc.)%2C%20but%20I%20find%20the%20documentation%20quite%20fragmented%2C%20and%20most%20of%20it%20appears%20to%20be%20targeted%20at%20the%20higher-end%20devices%20in%20the%20RT10xx%20family.%3C%2FP%3E%3CP%3EWhat%20I%E2%80%99m%20missing%20is%20a%20high-level%20overview%2C%20as%20well%20as%20a%20simple%20guide%20for%20a%20minimal%2C%20practical%20setup.%3C%2FP%3E%3CP%3EFrom%20what%20I%20understand%20so%20far%2C%20the%20RT1010%20ROM%20bootloader%20(accessed%20from%20the%20host%20via%20sdphost)%20can%20only%20load%20code%20into%20RAM.%20To%20program%20the%20external%20FlexSPI%20flash%2C%20a%20temporary%20flashloader%20must%20first%20be%20downloaded%20into%20RAM%20via%20this%20mechanism.%20This%20flashloader%20then%20performs%20the%20actual%20flash%20programming%2C%20typically%20in%20conjunction%20with%20blhost%26nbsp%3Bon%20the%20host%20side.%3C%2FP%3E%3CP%3EWhen%20using%20the%20Secure%20Provisioning%20Tool%2C%20it%20appears%20that%20a%20prebuilt%20flashloader%20binary%20is%20used%20internally%20for%20this%20purpose.%3C%2FP%3E%3CP%3EI%E2%80%99ve%20seen%20the%20terms%20%3CEM%3EKBOOT%3C%2FEM%3E%20and%20%3CEM%3EMCUboot%3C%2FEM%3E%20mentioned%20in%20this%20context%2C%20but%20it%E2%80%99s%20not%20clear%20to%20me%20whether%20the%20latter%20refers%20to%20an%20NXP-specific%20component%20or%20to%20the%20open-source%20MCUboot%20project%20from%20Trusted%20Firmware%20(%3CA%20href%3D%22https%3A%2F%2Fwww.trustedfirmware.org%2F%22%20target%3D%22_new%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fwww.trustedfirmware.org%3C%2FA%3E).%3C%2FP%3E%3CP%3EI%20also%20looked%20at%20the%20SDK%20example%20bootloader_examples%2Fflashloader%2C%20which%20unfortunately%20is%20very%20poorly%20documented.%20From%20experimenting%20with%20it%2C%20it%20seems%20to%20perform%20the%20same%20role%20as%20the%20prebuilt%20flashloader%20used%20by%20the%20Secure%20Provisioning%20Tool%3A%20once%20it%20has%20been%20programmed%2C%20I%20can%20use%20the%20tool%20to%20flash%20an%20application%20image%20without%20first%20loading%20the%20prebuilt%20flashloader.%3C%2FP%3E%3CP%3EFor%20an%20actual%20product%2C%20however%2C%20it%20seems%20that%20the%20intended%20approach%20would%20be%20to%20have%20a%20%3CEM%3Epersistent%3C%2FEM%3E%20flash-resident%20bootloader%20in%20external%20flash.%20The%20SDK%20flashloader%20example%2C%20as%20provided%2C%20does%20not%20appear%20to%20implement%20this.%3C%2FP%3E%3CP%3ESo%20my%20questions%20are%3A%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3EIs%20my%20general%20understanding%20of%20the%20RT1010%20boot%20%2F%20flashloader%20flow%20correct%3F%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EIf%20so%2C%20how%20is%20a%20persistent%20flash-resident%20bootloader%20typically%20implemented%20on%20RT1010%3F%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EWhat%20changes%20are%20required%20on%20the%20application%20side%20(linker%20settings%2C%20vector%20table%20relocation%2C%20etc.)%20to%20work%20in%20conjunction%20with%20such%20a%20bootloader%3F%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EIn%20previous%20PIC-based%20projects%2C%20I%20could%20include%20a%20precompiled%20bootloader%20as%20an%20%E2%80%9Cextra%20loadable%E2%80%9D%20alongside%20the%20main%20application.%20I%20assume%20a%20conceptually%20similar%20approach%20is%20required%20here%2C%20but%20implemented%20differently.%3C%2FP%3E%3CP%3EAny%20guidance%20or%20clarification%20would%20be%20highly%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2303118%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MXRT%20101x%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2304844%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.MX%20RT1010%20Bootloader%20%2F%20Flashloader%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2304844%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%3CBR%20%2F%3E%3CBR%20%2F%3ECheck%20out%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.utasker.com%2FiMX%2FRT1010.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.utasker.com%2FiMX%2FRT1010.html%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.utasker.com%2FiMX%2Fdevelopers.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.utasker.com%2FiMX%2Fdevelopers.html%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.utasker.com%2Fdocs%2FiMX%2FLoader.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.utasker.com%2Fdocs%2FiMX%2FLoader.pdf%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.utasker.com%2Fdocs%2FuTasker%2FuTaskerSerialLoader.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.utasker.com%2Fdocs%2FuTasker%2FuTaskerSerialLoader.pdf%3C%2FA%3E%3CBR%20%2F%3EAnd%20videos%20at%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DGXztWg9m6_8%26amp%3Blist%3DPLWKlVb_MqDQEOCnsNOJO8gd3jDCwiyKKe%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DGXztWg9m6_8%26amp%3Blist%3DPLWKlVb_MqDQEOCnsNOJO8gd3jDCwiyKKe%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EYou%20might%20find%20something%20you%20can%20use%2C%20including%20simplified%20and%20integrated%20encryption%20solution.%3CBR%20%2F%3E%3CBR%20%2F%3ERegards%3CBR%20%2F%3E%3CBR%20%2F%3EMark%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2326444%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.MX%20RT1010%20Bootloader%20%2F%20Flashloader%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2326444%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EFYI%2C%20because%20of%20issues%20with%20the%20NXP-provided%20bootloader%2C%20I%20used%20Mark's%20utasker-based%20bootloader%20mentioned%20below%20(on%20RT1024).%20Great%20support%20and%20it%20works%20well%20for%20my%20application.%20Use%20case%20here%20is%20bootloading%20from%20USB%20stick%20into%20RT1024%20internal%20flash%20with%20full%20security%20(encrypted%20distribution%20loaded%20into%20further-encrypted%20XIP%20internal%20flash).%3CBR%20%2F%3EHope%20that%20helps!%3CBR%20%2F%3EBest%20Regards%2C%20Dave%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2347648%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.MX%20RT1010%20Bootloader%20%2F%20Flashloader%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2347648%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3EDid%20the%20information%20shared%20in%20the%20thread%20help%20you%20understand%20the%20bootloaders%2Fflashloaders%20for%20the%20i.MX%20RT1010%2C%20or%20do%20you%20still%20have%20any%20questions%3F%3C%2FP%3E%0A%3CP%3EBest%20Regards%2C%3CBR%20%2F%3EPablo%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2348442%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.MX%20RT1010%20Bootloader%20%2F%20Flashloader%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2348442%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F231808%22%20target%3D%22_blank%22%3E%40Pablo_Ramos%3C%2FA%3E%26nbsp%3B-%20What%20are%20you%20talking%20about%3F%3CBR%20%2F%3ENXP%20has%20completely%20failed%20to%20answer%20any%20of%20the%20questions%20asked%20above.%3C%2FP%3E%3C%2FLINGO-BODY%3E