starfive-tech / Tools

19 stars 6 forks source link

jh7110-recovery-20221205.bin: CRC error #3

Closed xypron closed 1 year ago

xypron commented 1 year ago

Sending file jh7110-recovery-20221205.bin to the VisionFive 2 board using Tera Term VT using the XMODEM protocol results in

CRC Error, Try again

Board revision is V1.3B

xypron commented 1 year ago

I was able to recover the board with the code at https://github.com/xypron/JH71xx-tools, branch VisionFive2, commit 6e6da5069b476dfebfb0a08f77fb72abff294c3e.

orangecms commented 1 year ago

For reference: I wrote a similar CLI tool in Rust :crab: https://github.com/orangecms/vf2-loader

I am getting NAKs frequently though, could use more improvements, but it's mostly fine for small images during firmware development. Thank you for the C tool, I'm looking at it for reference.

xypron commented 1 year ago

@orangecms The XMODEM-CRC specification allows only 10 consecutive NAKs [1] but the implementation in the BootROM sends more consecutive NAKs. It is for this reason the the sx utility cannot be used.

[1] http://wiki.synchro.net/ref:xmodem

orangecms commented 1 year ago

@orangecms The XMODEM-CRC specification allows only 10 consecutive NAKs [1] but the implementation in the BootROM sends more consecutive NAKs. It is for this reason the the sx utility cannot be used.

Thank you for the hint! I mostly just power cycle fully to get back into a workable state, having lots of flaky experiences, regardless of the load tool I use. Often CRC errors, and retry never works then, only power off/on.