QMK ported to Model01

I don’t have time to learn how to wrangle Kaleidoscope from scratch - so I’ve ported QMK to the Model 01 instead.

You can find it here on Github; assuming you have a suitable dev setup all you need to do is type make model01:avrdude and your keyboard will be programmed.

It doesn’t support fancy dancy magic prancy LED effects, and QMK doesn’t support mouse warping either. But it does keys, which is what I was after :slight_smile:

6 Likes

I’ve also got to say thanks to Jesse for the scanner architecture - this was easy and pleasurable to port!

Nice work! Are you planning to submit it upstream?

Yep, I’ve got a PR up.

Thanks for your extensive efforts on Kaleidoscope - because it’s so neatly structured it was easy to find & port the bits that I needed, too :wink:

1 Like

That’s pretty damn cool. Nicely done.

Out of curiosity, what were you finding difficult to do with Kaleidoscope that’s easier for you with QMK?

The major driver for me was just skimming the extensive index of modules and their docs. I’m pretty short on time at the moment, and I determined it’d take me much longer to get up to speed than it would to write a port in an environment where I already know how everything works.
It only took about an hour and a half to get everything up and running. I’ve since spent longer getting it clean and tidy for upstream, of course, so maybe it wasn’t quite economical in the end. I did enjoy the process though…!

In some ways QMK is easier to get to grips with. There is a single repository which is easy to fork and modify, I’m still wrangling with multiple repositories and forks with Kaleidoscope. Also I think the tool chain suits people from a command line development background.

2 Likes

I’d be interested in trying to run QMK on my model01, but I’am running into a problem.

How do you program it? I’ve read the QMK documentation about setting up the build environment and installing the requirements but I can’t get avrdude to program the keyboard.

I have Arduino installed which can connect to the board just fine by pressing the prog button when uploading, but when trying to upload the QMK firmware it claims there is an error;

avrdude: error: programmer did not respond to command: leave prog mode

I even tried to use the avrdude configuration which is used by the arduino IDE, do I need to use the program button on the PCB?

/home/me/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/home/me/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega32u4 -cavr109 -P/dev/ttyACM0 -b57600 -D -Uflash:w:model01_default.hex:i

    avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/me/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/home/me/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyACM0
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : butterfly
         Description     : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .
^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[avrdude: butterfly_recv(): programmer is not responding
^[^[^[^[^[^[Found programmer: Id = "
.
"; type = 

.   Software Version = 
; Hardware Version = ..
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: error: programmer did not respond to command: leave prog mode

avrdude done.  Thank you.

If you are in the root of the qmk repository on linux then just using the make file should do e.g.

sudo make model01:dshields:flash

Just press the prog button when prompted.

1 Like

Thanks @dshields, I will try this tomorrow, when I’m at the office.

So I figured it out.

The Arduino IDE resets the micro controller when it starts the flashing procedure, if you are holding the progbram button at that moment it wil enter program mode. When using avrdude it doesn’t do the reset. I had to plugin in the USB connector while holding down the prog buttone to enter program mode and then start the flashing procedure with my other keyboard before finally getting it to flash. The flashing procedure is a bit finicky when using avrdude, I had mixed results and even had some difficulty flashing back to the kaleidoscope firmware.

But now that I can compile and flash QMK, I hope to get to play with some of its feature in the upcoming weeks.

Out of curiousity, I noticed the LEDs flickering when using QMK, I read somewhere that this is due to the fact that not all of the hardware features on the Model01 are supported by QMK. Does anyone know if these features will be ported?

1 Like

I believe the LED feature that is not implemented is the high speed batch update supported by the hardware. Saying that I’ve never has any issues with the LEDs flickering.

I tried this using both ‘make keyboardio/model01:default:avrdude’ and ‘qmk flash -kb keyboardio/model01 -km default’

They appeared to run successfully, but only the left half of the keyboard works. Any thoughts on what could be going wrong here?

Luckily I was able to reset everything to default with Chrysalis so at least I’m no worse off than before.

I was able to resolve the issue I mentioned above by setting [RGB_MATRIX_ENABLE = no] in [rules.mk]. It seems that the RGB effect in the QMK firmware uses too much power.

as the keyboardio parts have been moved to a sub-dir now, this changed to:
make keyboardio/model01:avrdude