-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails to verify once the size is big #17
Comments
Sorry I got so busy recently. I will take a look. |
Thank you! let me know if you need other binaries that fail. |
The problem is likely with the erase command. It only erases 8 KB. The length needs to be adjusted to the size of the firmware being flashed. The 0x08 is the size. Change it to 0x10, and it should work. |
Thanks, that seems to fix the issue! |
Latest original software pass sizes in 32 bits also. |
Indeed. I've also used 4 bytes for that command, even on a CH551 with a 2.3.1 bootloader. I think the bootloader is too small to have extra checks. |
See that... I should really fix it. Welcome PR for that :p |
Sorry, your latest commit has wrong divisor for erase size calculation ! erase_size = math.ceil(binary_size/0x1000) & 0xff |
…d file, provided the `CH55X_IC_REF` entry for the device has a key: `erase_required_pages` with the value of True Tested-by: Karl Palsson <[email protected]> Reviewed-by: Karl Palsson <[email protected]> I've (karlp) actually pretty heavily modified this, to be basically equivalent to what was already introduced in 2bd501c via MarsTechHAN#17
In several projects, the tool works flawlessly for small files. Once I reach a certain size, it stars giving this kind of error
`python3 -m ch55xtool -f build/fat32.bin -r
Found CH559.
BTVER: V2.40.
Failed to verify firmware of CH55x.`
I attach a CH559 binary file that fails. In all the cases, the official programmer works.
fat32.zip
The text was updated successfully, but these errors were encountered: