-
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
CH554 programming error ... #2
Comments
Are you sure this can be used to program an Intel HEX file? It mentions bin in the readme... |
Just a quick update -- I was able to get it to work with a binary file in my case, but not hex. (It could've been my hex file, but I think the answer is that flashing a bin file is the "safe" solution for now.) |
This does not working with hex, I might gonna to add it (and check file name suffix)later hmmm... I dont have older CH55x on my hand :( , so if @ishiyakazuo test it works, that will be nice. |
I have some CH55x with bootloader 2.3.1 still, if this is needed. |
Most flashing tools want hex files so this is an easy mistake to make. Conversion with objcopy is trivial so we don't have to add support for hex. However, we should at least warn the user. The README is quite clear about that but I had only looked at `--help`. It seems that I'm not the only who made this mistake: MarsTechHAN#2
Most flashing tools want hex files so this is an easy mistake to make. Conversion with objcopy is trivial so we don't have to add support for hex. However, we should at least warn the user. The README is quite clear about that but I had only looked at `--help`. It seems that I'm not the only who made this mistake: MarsTechHAN#2
Howdy!
Just experiment with the ch552 this morning ...
lsusb returns
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 7392:a812 Edimax Technology Co., Ltd
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 04f2:1825 Chicony Electronics Co., Ltd
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 015: ID 04e8:3315 Samsung Electronics Co., Ltd ML-2540 Series Laser Printer
Bus 001 Device 034: ID 4348:55e0 WinChipHead
Bus 001 Device 026: ID 239a:8019
Bus 001 Device 004: ID 0bda:0181 Realtek Semiconductor Corp.
Bus 001 Device 002: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
I can see WinChipHead ...
Got this error, when I attempted to flash ...
rasyoung@vic2016:~/code_test/8051/wch/ch554_sdcc/examples/blink$ sudo python ch55xtool.py --file blink.hex
Found CH554.
BTVER: V2.31.
Traceback (most recent call last):
File "ch55xtool.py", line 337, in
__main()
File "ch55xtool.py", line 314, in __main
ret = __write_flash_ch55x_v23(dev, chk_sum, payload)
File "ch55xtool.py", line 143, in __write_flash_ch55x_v23
payload = payload + [0] * ((math.ceil(len(payload) / 56) * 56) - len(payload)) # Payload needs to be padded, 56 is a good number
TypeError: can't multiply sequence by non-int of type 'float'
I notice in the hex file ... the first lines are "short"
:03000000020006F5
:03005F0002000399
:0300030002006296
:1000620012007C53930CAF92747F5FF5924393809E
:100072009000641200A4B29780F675A15575A1AAEA
:1000820074F855B94405F5B975A10022AE82AF8363
It reports the correct chip type and bootloader version. Wondered if you know what was the issue?
Thanks for posting this code!
Randy
The text was updated successfully, but these errors were encountered: