how to check image CRC

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

how to check image CRC

ソリューションへジャンプ
633件の閲覧回数
victorchiou
Contributor I

I have an image built using the MCUXpresso Secure Provisioning Tool.

It's a plain image with a CRC,
and the offsetToExtendedHeader field(address 0x00000028) contains the 4bytes CRC checksum value.

victorchiou_1-1720002177605.png

 

Now, I want to check the CRC before writing it to flash.
I tried to calculate it using these settings,
but I cannot match the CRC with the offsetToExtendedHeader field.
victorchiou_0-1720001430811.png
(ref: Kinetis Bootloader v2.0.0 Reference Manual)

Is there any tool available to calculate the image CRC (like nxpimage and blhost)? Alternatively, where can I find more details about calculate the image CRC?

ラベル(2)
0 件の賞賛
返信
1 解決策
622件の閲覧回数
marek-trmac
NXP Employee
NXP Employee

Hi Victor,

SEC tool uses SPSDK application nxpimage to build a CRC bootable image. You can see generated build script to find, how the nxpimage tool is used.

See main menu > Help > SPSDK Online Documentation for nxpimage documentation.

SPSDK is opensource, so you can find implementation details in GitHub.

Regards,
Marek

元の投稿で解決策を見る

2 返答(返信)
590件の閲覧回数
victorchiou
Contributor I

Hi Marek


I found the Mbi_ExportMixinCrcSign function
and the CRC algorithm in the nxpimage tool, which is part of SPSDK.

victorchiou_0-1720086599812.png

Based on the above algorithm,
I created a python program to verify the image CRC,
and it works.

Thanks for your support.

0 件の賞賛
返信
623件の閲覧回数
marek-trmac
NXP Employee
NXP Employee

Hi Victor,

SEC tool uses SPSDK application nxpimage to build a CRC bootable image. You can see generated build script to find, how the nxpimage tool is used.

See main menu > Help > SPSDK Online Documentation for nxpimage documentation.

SPSDK is opensource, so you can find implementation details in GitHub.

Regards,
Marek