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?

828 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
8 Replies

765 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

734 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

730 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

633 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @pcpro1789 

Thank you for your patience and additional details!

How are you invalidating the CRC? Are you modiying this parameter in the image binary and then programming the image?

Btw, I am sorry, I  can not see the  the attached PDF, is this a document from us? Would you  please let me know where to find the document or attach it again?

Diego

 

 

0 Kudos
Reply

618 Views
pcpro1789
Contributor III

@diego_charles I am trying to calculate the CRC to insert into a production binary image at offset 0x28.  The flowchart mentioned in my earlier response is attached here.

0 Kudos
Reply

393 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @pcpro1789 

Thank you for your reply and patience. 

 I just want to maintain you updated, and apologize for the delayed response. With regards to this: 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.  I am testing on my end using the MCUXpresso Secure Provisioning Tool.

Diego

0 Kudos
Reply

353 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @pcpro1789 

I send you an email on your ticket 00654062 Implementing CRC32 Image Check in Bootloader, please check  your email inbox and let me know, any comments

Diego

0 Kudos
Reply

780 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