How to use elftosb to generate image with plain CRC on bootup enabled?

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

How to use elftosb to generate image with plain CRC on bootup enabled?

144 Views
pcpro1789
Contributor III

The title says it all.  How can elftousb be used to generate an image with the plain CRC check enabled?  We're using load to RAM, not run in place.

 
 
Labels (1)
Tags (2)
0 Kudos
Reply
4 Replies

81 Views
pcpro1789
Contributor III

@diego_charles Thanks for the response.  All I need is to be able to generate the plain CRC value for a load to RAM application on the MIMXRT685SFAWB, but I've been unable to find straightforward documentation that describes how to do this.  It all seems to be focused on using the more secure options.  Where may I find step-by-step instructions for generating the plain CRC value for a load to RAM application on the MIMXRT685SFAWB?

0 Kudos
Reply

50 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @pcpro1789 

My apologies for the delayed response.

I want to understand better your goal, could you help me?

The RT600 supports booting plain images  with CRC

diego_charles_0-1735321507090.png

Those images can be non-XIP or XIP

diego_charles_2-1735321554949.png

Do you need booting this kind of images with CRC or only the computed CRC value?

Happy holidays, 

Diego

 

 

 

 

0 Kudos
Reply

46 Views
pcpro1789
Contributor III

Thanks, @diego_charles.  To my knowledge, I need help calculating the CRC value that needs to be populated at offset 0x28, as well as ensuring that CRC validation is actually happening.  The image length is populated at offset 0x20, and the value 0x2 (plain image with CRC - load to RAM) is populated at offset 0x24.

I've been working from the assumption that the internally calculated CRC at bootup uses the built-in CRC Engine module.  From that, I've developed an algorithm to calculate the CRC based on the flowchart in the attached PDF. 

Unfortunately, it does not appear that CRC validation is being performed at bootup.  That is, even if I deliberately invalidate the CRC, the firmware application still runs.  My expectation was that the device would get stuck in the bootloader.

Tags (1)
0 Kudos
Reply

96 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @pcpro1789 

Please note that the elftosb tool was replaced by the nxpimage tool. The nxpimage is part of the NXP secure Provisioning SDK, or SPSDK.

diego_charles_2-1734469894883.png 

From SPSDK documentation https://spsdk.readthedocs.io/en/latest/apps/nxpimage.html#nxpimage 

The MCUXpresso Secure Provisioning Tool GUI does call the SPSDK APIS and tools to create bootable images.

To create with ease this kind of image using elftosb, you can use older versions of the MCUXpresso Secure Provisioning Tool, for example version 7.0. You can see in the log, calls to the elftosb GUI

diego_charles_0-1734469593617.png

However,  it is always better if you use latest versions. For example MCUXPresso Secure Provisioning Tool v10, which does use nxpimage instead.

diego_charles_1-1734469719197.png

I hope this could help you.

Diego

 

0 Kudos
Reply