Support command: CRC

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,054件の閲覧回数
Slavic
Contributor II

Hello,

Could you please help me with the following 2 questions? 

1. I need to verify that the image that I loaded to FLASH is correct.

Firstly, I would like to use support command CRC. Do you have an example of how to use it ?

I use FB (Fast Bootloader) to load image to SPI NOR memory.

How to use CRC for address range ? :

FB[-t 1000000]: ucmd sf write ${loadaddr} 0x80000 0x7C0000

 

2. After completion of image loading to FLASH, Is there an option to read back the written image from the FLASH for checksum verification, using UUU ?

 

Thanks you so much,

Yaroslav 

0 件の賞賛
返信
1 解決策
1,006件の閲覧回数
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

No, CRC only would work out of UUU. It's documented on UUU but our U-Boot doesn't support it, turning impossible to use CRC on host side (UUU) nor U-boot.

That's why I shared the SHA method, our U-Boot does support it through:

CONFIG_CMD_SHA1SUM

Regards

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
1,010件の閲覧回数
Slavic
Contributor II

Thank you for your fast reply!

I work with processor i.mx6.
In my uuu.auto,  used FB(Fast Bootloader). The u-boot.imx is written to SPI NOR via u-boot:

SDP: boot -f firmware-mfgtool-specific/u-boot.imx-mfgtool

#Write u-boot.imx in to SPI NOR via u-boot
FB: ucmd setenv fastboot_buffer ${loadaddr}


I am looking for a tool to confirm that the image was transferred properly to the board. Even partially (to verify a part of the path).
I reviewed your helpful example above to run a SHA1 checksum, but I don't have currently the option to work on this feature
I would like to clarify the following sections of the UUU.pdf help document.
In Section 5.5.1, the CRC part. Is it implemented just on the side of the PC? There is no option to run CRC on the target side and the host ? I mean to verify that the packet was delivered properly?

crc -f [-format "mmc read $loadaddr"] [-blksz 512][ -crcblock 0x4000000] [-seek 0] [-skip 0] [-nostop] seek skip block number from storage skip skips byte from -f nostop continue check even if found mismatch

Thank you!

0 件の賞賛
返信
1,007件の閲覧回数
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

No, CRC only would work out of UUU. It's documented on UUU but our U-Boot doesn't support it, turning impossible to use CRC on host side (UUU) nor U-boot.

That's why I shared the SHA method, our U-Boot does support it through:

CONFIG_CMD_SHA1SUM

Regards

0 件の賞賛
返信
908件の閲覧回数
Slavic
Contributor II

I have issues with UUU tool when I run it on different laptops. I don't succeed in running it robustly from different laptops. Our field engineers have different laptop brands, however, they have installed Windows 10 and Windows 11. 

I try to run UUU with different delays for different laptops:

echo off

uuu.exe -v -V -pp 3000 uuu.setfuse

echo Error level is %errorlevel%

IF '%errorlevel%' EQU '0' (

waitfor -t 10 noone >NUL 2>NUL

uuu.exe -v -V -pp 3000 uuu.auto

)

And still what is running on one laptop doesn't work on another laptop. 

I get an error level of -1 or sometimes an error level of -2.

I use version uuu_1.3.130. I tried version uuu_1.5.125 and I have seen the same issues. 

Could you please recommend to me how to call for uuu.exe so that it will run robustly without interruption?

タグ(3)
0 件の賞賛
返信
1,026件の閲覧回数
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Thank you for your interest in NXP Semiconductor products,

No, you can attack from u-boot with SHA1 following this guide.

# Calculate SHA1 sum from flash.bin
$ sha1sum flash.bin

# Read to specific RAM from specific block the number of flash.bin blocks
> mmc read <specific-RAM> <starting-block> <blocks-of-flash>

# Calculate SHA1 sum of number of bytes and compare
> sha1sum <specific-RAM> <bytes-of-flash>

Regards

951件の閲覧回数
Slavic
Contributor II
Thank you !