How does blhost cut build files

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

How does blhost cut build files

1,734件の閲覧回数
longzhao1
Contributor I

I am trying to understand how does blhost execute the flash process. I ran this command to flash the build file to the device

./blhost -p /dev/ttyUSB0,xxxxx -- write-memory 0xxxxxxx buildFile.bin
I then use wireshark to intercept usb0's traffic, I found that blhost cut the big .bin file into several segments, and send these segments one by one to flash the device.
pastedImage_2.png
At here, the blhost sends out two 320 bytes segments, followed with a 70 bytes segments each time. In the first 8 bytes of the first 320 bytes segment, it has the same hex data (5a a5 00 02). 
pastedImage_3.png
pastedImage_4.png
My questions:
1. Why does blhost cut the data into 2 * 320 bytes of data + 1 * 70 bytes of data, then repeat?
2. Why the first 8 bytes are the same? What does this 8 bytes mean?
3. How does blhost knows that every segment is received correctly?
4. Where can I get blhost source code?
タグ(1)
0 件の賞賛
返信
3 返答(返信)

1,579件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi Zhao,

Attachment is MCUboot bootloader user's manual. It has the detail of communication protocol. Please take a look.

Blhost source code is not opened to customer.

Regards,

Jing

0 件の賞賛
返信

1,579件の閲覧回数
longzhao1
Contributor I

For some reasons that I couldn't use blhost to flash the device, just wondering that is it possible to send hex data directly to the device to trigger the flash process?

0 件の賞賛
返信

1,579件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

It sounds too difficult.

0 件の賞賛
返信