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

The chip id 0x00 is currently not support in this program #16

Open
prosper00 opened this issue Feb 9, 2021 · 2 comments
Open

The chip id 0x00 is currently not support in this program #16

prosper00 opened this issue Feb 9, 2021 · 2 comments

Comments

@prosper00
Copy link

Linux (Ubuntu 20.10):

$ wchisptool 
Error while bulking in: LIBUSB_ERROR_OVERFLOW
Libre CH551 Flasher 2018
The chip id 0x00 is currently not support in this program

I did get a few compiler warnings when building:

$ make
cc -O2 main.c -o wchisptool `pkg-config --cflags --libs libusb-1.0`
main.c: In function ‘main’:
main.c:230:2: warning: ‘libusb_set_debug’ is deprecated: Use libusb_set_option instead [-Wdeprecated-declarations]
  230 |  libusb_set_debug(NULL, 3);
      |  ^~~~~~~~~~~~~~~~
In file included from main.c:25:
/usr/include/libusb-1.0/libusb.h:1325:18: note: declared here
 1325 | void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
      |                  ^~~~~~~~~~~~~~~~
main.c:327:3: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  327 |   fread(file_buffer, 1, file_length, fp);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:588:3: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  588 |   fread(file_buffer, 1, file_length, fp);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@prosper00
Copy link
Author

prosper00 commented Feb 9, 2021

edit: the vnproch55 programmer used in ch55xduino works fine:

/home/bdroy/.arduino15/packages/CH55xDuino/tools/MCS51Tools/2020.12.01/linux/vnproch55x /tmp/arduino_build_302531/CMSIS_DAP.ino.hex 
------------------------------------------------------------------
CH55x Programmer by VNPro
------------------------------------------------------------------
Load file as hex
   Loaded 9670 bytes between: 0000 to 25F3
DeviceVersion of CH55x: 2.40 
MCU ID: 52 11
Found Device CH552
Bootloader: 2.4.0
ID: 92 11 8A 5C
XOR Mask: 89 89 89 89 89 89 89 DB 
Write 9716 bytes from bin file.
.................................................�[2K
Write complete!!!
Verify chip
.................................................�[2K
Verify complete!!!
------------------------------------------------------------------

so does ch55xtool:

$ ./ch552tool.sh 
Found CH552.
BTVER: V2.40.

@prosper00
Copy link
Author

So, I guess this is because new (since about a year ago) chips ship with bootloader version 2.40, which librech551 doesn't support.

For the benefit of anyone else stumbling onto this repo with this problem, the following flashers DO work with more recent chips:

VNPro (patched for more CH55x chips) (https://github.com/LoveMHz/vnproch55x)
This is what's used in ch55xduino

ch55x-isptool (https://github.com/ElectronicCats/ch55x-isptool)

chflasher (https://github.com/atc1441/chflasher)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant