You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
actually if you look in k5prog.c at the comment on line 679:
/* 0x19 0x5 0xc 0x1 0x8a 0x8d 0x9f 0x1d
* address_msb address_lsb 0xe6 0x0 length_msb length_lsb 0x0 0x0
* [0x100 bytes of data, if length is <0x100 then fill the rest with zeroes] */
i did write length_msb length_lsb :)
so i think that you've found a bug. will try to debug it next week
I wrote my own tool for read/write eeprom and upload firmware: https://github.com/qrp73/K5TOOL
It has detailed protocol log, support firmware image in packed and unpacked formats, and has UV-K5 bootloader simulator which allows to use it as UV-K5 simulator to use original firmware updater and analyze protocol in the log.
I tested original firmware updater with simulator and found that your version for length field is correct and uvtool version is mistaken.
it appears that both variants are incorrect. The packet contains packet number, not offset... And it uses Little Endian...
So k5prog and other tools using incorrect packet structure, but it appears that these mistakes in most cases don't affect firmware upload procedure :)
I'm analyze source code and found some strange inconsistency.
Your k5prog utility uses write flash packet with data length fields 0x00,0x01, see this line:
k5prog/k5prog.c
Line 698 in 241ab18
But uvtool flasher uses this packet with length in reversed order 0x01,0x00, see this line:
https://github.com/whosmatt/uvmod/blob/72eecd083e50a7b2f12404d49ee157d3d200841b/js/tool_patcher.js#L178
https://github.com/egzumer/uvtools/blob/7148b01f11357cb28e74fff3a9591b12a656ea13/js/tool_patcher.js#L178
Could you please help to understand what is going on here? And which version is correct?
Thanks
The text was updated successfully, but these errors were encountered: