Skip to content
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

Missing chip data file after pipy installation #25

Closed
kossnikita opened this issue Jul 16, 2022 · 10 comments
Closed

Missing chip data file after pipy installation #25

kossnikita opened this issue Jul 16, 2022 · 10 comments
Labels
bug Something isn't working

Comments

@kossnikita
Copy link

Found CH552.
BTVER: V2.50.
Bootloader version not supported.
@vowstar
Copy link
Collaborator

vowstar commented Jul 17, 2022

The version on pipy is relatively old, please use the source code directly to support the version you mentioned. This tool has been tested to support versions 2.5, 2.6, 2.7 and higher, the version you reported is probably not the version in the current code.
Please use branch master

@vowstar vowstar added the invalid This doesn't seem right label Jul 17, 2022
@kossnikita
Copy link
Author

kossnikita commented Jul 18, 2022

PS D:\Keil\01-KeilExample\01-Blink\Objects> pip show ch55xtool
Name: ch55xtool
Version: 0.0.2
Summary: An open sourced python tool for flashing WCH CH55x series USB microcontroller
Home-page: https://github.com/MarsTechHAN/ch552tool
Author: Han Xiao
Author-email: [email protected]
License: UNKNOWN
Location: c:\python310\lib\site-packages
Requires: pyusb
Required-by:
PS D:\Keil\01-KeilExample\01-Blink\Objects> python -m ch55xtool -f .\Blink.hex
Chip ID: 52 is not known = not supported
Welcome to report this issue with a screen shot from the official CH5xx tool.

WCH tool log:

** User file name:D:\KEIL\01-KEILEXAMPLE\01-BLINK\OBJECTS\BLINK.HEX
** Download bytes:2744 B
User file HASH: B482ADA6A070DA0A5CE963F34EBD700635A46617
Via usb download CH552 firmware
Device No.65729464 is started to download
Jump to BOOT from the user area,configuration bits cannot be modified!
BTVER:02.50
UID:71-79-0-0-0-0-0
Erasing...
 complete
Programing...
 complete
Verifying...
complete
1#device device download is complete
Total download:1, 1 succeed, 0 failed
time used:0.908s

@vowstar
Copy link
Collaborator

vowstar commented Jul 19, 2022

Run pip install --upgrade ch55xtool and try again

@kossnikita
Copy link
Author

Same again

PS D:\Keil\01-KeilExample\01-Blink\Objects> pip show ch55xtool
Name: ch55xtool
Version: 1.0.0
Summary: An open sourced python tool for flashing WCH CH55x series USB microcontroller
Home-page: https://github.com/MarsTechHAN/ch552tool
Author: Han Xiao
Author-email: [email protected]
License: UNKNOWN
Location: c:\python310\lib\site-packages
Requires: pyusb
Required-by:
PS D:\Keil\01-KeilExample\01-Blink\Objects> python -m ch55xtool -f .\Blink.hex
Chip ID: 52 is not known = not supported
Welcome to report this issue with a screen shot from the official CH5xx tool.
PS D:\Keil\01-KeilExample\01-Blink\Objects>

@kossnikita
Copy link
Author

52 is id in HEX, but in the typeall.wcfg it is in DEC. Could there be a problem here?

@vowstar vowstar added enhancement New feature or request ch55x error and removed invalid This doesn't seem right labels Jul 19, 2022
@vowstar vowstar changed the title Support for bootloader 2.50 Missing chip data file after pipy installation Jul 19, 2022
@vowstar vowstar added bug Something isn't working and removed enhancement New feature or request ch55x error labels Jul 19, 2022
@vowstar
Copy link
Collaborator

vowstar commented Jul 19, 2022

This is because the chip data file is missing after pipy is installed, so the installation from pipy cannot be programmed.
https://github.com/MarsTechHAN/ch552tool/blob/master/ch55xtool/typeall.wcfg
This is a bug in packaging.

vowstar added a commit that referenced this issue Jul 19, 2022
@vowstar
Copy link
Collaborator

vowstar commented Jul 19, 2022

We have figured out the cause of this bug and repackaged v1.0.2. The new package will install two chip id configuration files, extended.wcfg and typeall.wcfg. This is not a hex conversion problem, but the file is not found.
Run pip install --upgrade ch55xtool and try again

@kossnikita
Copy link
Author

kossnikita commented Jul 19, 2022

It's works! Thanks!

PS D:\Keil\01-KeilExample\01-Blink\Objects> python -m ch55xtool -f .\Blink.bin
Found CH552 with SubId:17
BTVER:02.50
UID:71-79-00-00-00-00-00-00
Erasing chip flash. Done.
Flashing chip. Done.
Finalize communication. Done.

@Emiluren
Copy link

Should perhaps this line:

pathname = os.path.dirname(sys.argv[0])

be changed to this?

pathname = os.path.dirname(__file__)

then ch55xtool would work as well as python3 -m ch55xtool.

vowstar added a commit that referenced this issue Dec 29, 2022
then ch55xtool would work as well as python3 -m ch55xtool

Issue: #25
Signed-off-by: Huang Rui <[email protected]>
@vowstar
Copy link
Collaborator

vowstar commented Dec 29, 2022

Should perhaps this line:

pathname = os.path.dirname(sys.argv[0])

be changed to this?

pathname = os.path.dirname(__file__)

then ch55xtool would work as well as python3 -m ch55xtool.

Done e33ff9b.

Thanks a lot, this is a nice improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants