qmk / qmk_flasher

flashing utility for the Atmel AVR USB family
MIT License
63 stars 24 forks source link

ATmega32u2 support #29

Closed NoahAndrews closed 7 years ago

NoahAndrews commented 7 years ago

Some keyboards, like the Alps64, are based on the ATmega32u2. Currently, we only detect and flash ATmega32u4 boards. It would be trivial to also test for and flash the ATmega32u2 or at90usb1286.

I would really like to see this tool get to the point where it can flash any keyboard that QMK is capable of running on, without having to tell it things like which chip it uses.

skullydazed commented 7 years ago

These seem to be the two best libraries for doing detection:

https://github.com/tessel/node-usb

https://github.com/schakko/node-usb

The @tessel version calls out the need for Zadig to avoid LIBUSB_ERROR_NOT_SUPPORTED. I'm not sure if @schakko's version requires it but does not call that out, or if it does not require it. More research would be good.

NoahAndrews commented 7 years ago

Nice, using something like those sound like a good idea. I was planning on just calling dfu-programmer for each type.

skullydazed commented 7 years ago

Yeah, using these means adding support for other tools (like teensy and pro micro) becomes easier.

skullydazed commented 7 years ago

I looked into this and we don't need Zadig for the functionality we'll be using. We only need Zadig if we intend to open a USB device, simply enumerating USB devices can be done without it.