Author Topic: Flash TMK firmware on b.face PCB  (Read 6797 times)

0 Members and 1 Guest are viewing this topic.

Offline Ngt

  • * Elevated Elder
  • Thread Starter
  • Posts: 2346
  • Location: Switzerland
Flash TMK firmware on b.face PCB
« on: Fri, 10 June 2016, 15:40:07 »
Hello everyone!


Is it possible to flash TMK firmware onto a b.face PCB using the BootMapperClient provided by winkeyless.kr? It seems that TMK is designed for AVR chip but I didn't find any explicit mention that the b.face is shipped with one other than the name of the actual firmware ps2avrU. I don't know what it is worth as an indication though.


Did anyone do it? I want to flash TMK on it because I need to play with the space bar actuation time in order to properly set up the SpaceFN layout on it. AFAIK it is not possible to do it with the default firmware on the PCB.


Thanks for your time. ;)


EDIT: As a reference my microcontroller has this written on it: atmega32a au 1436
« Last Edit: Tue, 14 June 2016, 06:28:49 by Ngt »

Silenced Novatouch w/ Hack'd by Geeks

Sold: Ducky Zero Shine (Brown) | Poker 2 (Blue) | HHKB 55g Type-S

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Flash TMK firmware on b.face PCB
« Reply #1 on: Fri, 10 June 2016, 17:58:36 »
No, BootMapperClient can't do it.

It may be possible do this though, assuming the board has the necessary header and an atmega32u4 - it's definitely an atmel (pic) but it's not the same as the one on my Teensy and I can't read it...

How brave are you feeling?
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline Ngt

  • * Elevated Elder
  • Thread Starter
  • Posts: 2346
  • Location: Switzerland
Re: Flash TMK firmware on b.face PCB
« Reply #2 on: Sat, 11 June 2016, 04:14:17 »
No, BootMapperClient can't do it.

It may be possible do this though, assuming the board has the necessary header and an atmega32u4 - it's definitely an atmel (pic) but it's not the same as the one on my Teensy and I can't read it...

How brave are you feeling?

Thanks for your answer. I must admit I didn't anticipated such a task even though it doesn't seem impossible. I just fear that it could harm the PCB. Perhaps I ought to ask winkeyless directly to see what he thinks about it. There might be a way to play with the actuation time with its soft that I didn't know/see.

Silenced Novatouch w/ Hack'd by Geeks

Sold: Ducky Zero Shine (Brown) | Poker 2 (Blue) | HHKB 55g Type-S

Offline Ngt

  • * Elevated Elder
  • Thread Starter
  • Posts: 2346
  • Location: Switzerland
Re: Flash TMK firmware on b.face PCB
« Reply #3 on: Sat, 11 June 2016, 04:24:06 »
No, BootMapperClient can't do it.

It may be possible do this though, assuming the board has the necessary header and an atmega32u4 - it's definitely an atmel (pic) but it's not the same as the one on my Teensy and I can't read it...

How brave are you feeling?

Perhaps I could just read the inscription on the chip on the PCB, couldn't I? Or is it on the chip's face that is in contact with the PCB itself therefore hidden?

Silenced Novatouch w/ Hack'd by Geeks

Sold: Ducky Zero Shine (Brown) | Poker 2 (Blue) | HHKB 55g Type-S

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Flash TMK firmware on b.face PCB
« Reply #4 on: Sat, 11 June 2016, 05:09:43 »
Yeah you can read the chip on the board, it's just small so hard to photograph.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline Ngt

  • * Elevated Elder
  • Thread Starter
  • Posts: 2346
  • Location: Switzerland
Re: Flash TMK firmware on b.face PCB
« Reply #5 on: Sat, 11 June 2016, 06:29:44 »
Yeah you can read the chip on the board, it's just small so hard to photograph.

Alright thanks. I'm not home atm but I'll take a look soon and let you know. :)

Silenced Novatouch w/ Hack'd by Geeks

Sold: Ducky Zero Shine (Brown) | Poker 2 (Blue) | HHKB 55g Type-S

Offline MOZ

  • KING OF THE NEWBIES
  • * Maker
  • Posts: 3981
  • Location: Jo'burg
  • Busy making stuff
Re: Flash TMK firmware on b.face PCB
« Reply #6 on: Sat, 11 June 2016, 07:03:28 »
Not possible. All the "B" PCBs like the ones from WKL use atmega32A and V-USB.

Here's my post from Easy AVR thread,
All the B series PCBs use Atmega32A and vUSB, so they aren't supported.

As a general rule,
- winkeyless.kr (B series) PCBs use Atmega32A, which isn't supported. Use their bootMapperClient application
- Leeku/LifeZone PCBs also use Atmega32A. Use their JigOn application
- Duck keyboards use Atmega32u4 and can be programmed using Easy AVR/TMK.
- GON's keyboards also use Atmega32U4 and can be programmed using Easy AVR/TMK but the bootloader has to be changed.
- Most boards developed in the west use Atmega32u4 or a Atmel USB AVR MCU (Atmega32u4, AT90USB1286, Atmega32u2, Atmega16u2, etc)
- InputClub keyboards use Kinetis K20 based MCU, which isn't supported. Use their online configurator.


Offline Ngt

  • * Elevated Elder
  • Thread Starter
  • Posts: 2346
  • Location: Switzerland
Re: Flash TMK firmware on b.face PCB
« Reply #7 on: Sat, 11 June 2016, 08:16:55 »
Not possible. All the "B" PCBs like the ones from WKL use atmega32A and V-USB.

Here's my post from Easy AVR thread,
All the B series PCBs use Atmega32A and vUSB, so they aren't supported.

As a general rule,
- winkeyless.kr (B series) PCBs use Atmega32A, which isn't supported. Use their bootMapperClient application
- Leeku/LifeZone PCBs also use Atmega32A. Use their JigOn application
- Duck keyboards use Atmega32u4 and can be programmed using Easy AVR/TMK.
- GON's keyboards also use Atmega32U4 and can be programmed using Easy AVR/TMK but the bootloader has to be changed.
- Most boards developed in the west use Atmega32u4 or a Atmel USB AVR MCU (Atmega32u4, AT90USB1286, Atmega32u2, Atmega16u2, etc)
- InputClub keyboards use Kinetis K20 based MCU, which isn't supported. Use their online configurator.


Thanks for your answer. I reached out to WKL prior this morning and he told me the same. I'm not sure you can play with the actuation time on BootMapperClient though. :(

Silenced Novatouch w/ Hack'd by Geeks

Sold: Ducky Zero Shine (Brown) | Poker 2 (Blue) | HHKB 55g Type-S

Offline hasu

  • Posts: 3474
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Flash TMK firmware on b.face PCB
« Reply #8 on: Mon, 13 June 2016, 02:20:43 »
Not possible. All the "B" PCBs like the ones from WKL use atmega32A and V-USB.

Here's my post from Easy AVR thread,
All the B series PCBs use Atmega32A and vUSB, so they aren't supported.

As a general rule,
- winkeyless.kr (B series) PCBs use Atmega32A, which isn't supported. Use their bootMapperClient application
- Leeku/LifeZone PCBs also use Atmega32A. Use their JigOn application
- Duck keyboards use Atmega32u4 and can be programmed using Easy AVR/TMK.
- GON's keyboards also use Atmega32U4 and can be programmed using Easy AVR/TMK but the bootloader has to be changed.
- Most boards developed in the west use Atmega32u4 or a Atmel USB AVR MCU (Atmega32u4, AT90USB1286, Atmega32u2, Atmega16u2, etc)
- InputClub keyboards use Kinetis K20 based MCU, which isn't supported. Use their online configurator.



Not sure about Easy AVR but you can compile TMK with V-USB and it should work on the controller.
You have to look into matrix circuit, write code to support the keyboard at least, you also need custom ldscript to use the original bootloader, perhaps.

Offline Ngt

  • * Elevated Elder
  • Thread Starter
  • Posts: 2346
  • Location: Switzerland
Re: Flash TMK firmware on b.face PCB
« Reply #9 on: Mon, 13 June 2016, 02:43:14 »
Not possible. All the "B" PCBs like the ones from WKL use atmega32A and V-USB.

Here's my post from Easy AVR thread,
All the B series PCBs use Atmega32A and vUSB, so they aren't supported.

As a general rule,
- winkeyless.kr (B series) PCBs use Atmega32A, which isn't supported. Use their bootMapperClient application
- Leeku/LifeZone PCBs also use Atmega32A. Use their JigOn application
- Duck keyboards use Atmega32u4 and can be programmed using Easy AVR/TMK.
- GON's keyboards also use Atmega32U4 and can be programmed using Easy AVR/TMK but the bootloader has to be changed.
- Most boards developed in the west use Atmega32u4 or a Atmel USB AVR MCU (Atmega32u4, AT90USB1286, Atmega32u2, Atmega16u2, etc)
- InputClub keyboards use Kinetis K20 based MCU, which isn't supported. Use their online configurator.



Not sure about Easy AVR but you can compile TMK with V-USB and it should work on the controller.
You have to look into matrix circuit, write code to support the keyboard at least, you also need custom ldscript to use the original bootloader, perhaps.


Thanks for your answer Hasu. I must admit I'm a bit lost as I don't know much about electronic and low level programming. I'll look up based on what you told me and I'll see what I can find.

Silenced Novatouch w/ Hack'd by Geeks

Sold: Ducky Zero Shine (Brown) | Poker 2 (Blue) | HHKB 55g Type-S

Offline MOZ

  • KING OF THE NEWBIES
  • * Maker
  • Posts: 3981
  • Location: Jo'burg
  • Busy making stuff
Re: Flash TMK firmware on b.face PCB
« Reply #10 on: Mon, 13 June 2016, 03:55:27 »
Thanks for that hasu, are you aware of any project using V-USB with TMK?

Offline hasu

  • Posts: 3474
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Flash TMK firmware on b.face PCB
« Reply #11 on: Mon, 13 June 2016, 07:07:40 »
Thanks for that hasu, are you aware of any project using V-USB with TMK?

My controller for HHKB had used V-USB on ATMega328p originally, instead of ATMega32u4. Also my PS/2 converter project can be built with V-USB, LUFA or mbed. I don't know if someone other than me uses it, though.

Offline xauser

  • Posts: 97
Re: Flash TMK firmware on b.face PCB
« Reply #12 on: Tue, 14 June 2016, 14:19:19 »
I ported tmk to the Leeku/LifeZone l3 compact pcb. This was a real pita as I had no experience with debugging an atmega32a which
was already soldered on a pcb and usart was not available. This port also required some changes (ifdefs) to tmk core and doesn't support
all fancy features that the original firmware does.

So, it is possible to port tmk to atmega32a based boards but it's also a lot of work.
« Last Edit: Tue, 14 June 2016, 14:21:05 by xauser »

Offline Ngt

  • * Elevated Elder
  • Thread Starter
  • Posts: 2346
  • Location: Switzerland
Re: Flash TMK firmware on b.face PCB
« Reply #13 on: Wed, 15 June 2016, 02:29:43 »
I ported tmk to the Leeku/LifeZone l3 compact pcb. This was a real pita as I had no experience with debugging an atmega32a which
was already soldered on a pcb and usart was not available. This port also required some changes (ifdefs) to tmk core and doesn't support
all fancy features that the original firmware does.

So, it is possible to port tmk to atmega32a based boards but it's also a lot of work.


Do you remember what are the missing features?


I have no interest in making it work if I cannot do what I want in the end.

Silenced Novatouch w/ Hack'd by Geeks

Sold: Ducky Zero Shine (Brown) | Poker 2 (Blue) | HHKB 55g Type-S

Offline xauser

  • Posts: 97
Re: Flash TMK firmware on b.face PCB
« Reply #14 on: Wed, 15 June 2016, 14:14:58 »
I ported tmk to the Leeku/LifeZone l3 compact pcb. This was a real pita as I had no experience with debugging an atmega32a which
was already soldered on a pcb and usart was not available. This port also required some changes (ifdefs) to tmk core and doesn't support
all fancy features that the original firmware does.

So, it is possible to port tmk to atmega32a based boards but it's also a lot of work.


Do you remember what are the missing features?


I have no interest in making it work if I cannot do what I want in the end.

Original l3 firmware supports ps2 and usb protocol, I've only ported usb protocol using vusb.
There are also endless led modes in original firmware (flashing, breathing, by keypress) I only
ported color change and on off.

I also had to disable some power saving features of tmk core that weren't available on the atmega32a.

To get spacefn to work I had to patch timer code in tmk core as well. I have my port running for
some months now and are quite happy with the result. Keyboard works with spacefn over usb protocol
with basic led features. That's fine for me and I stopped working any further on the port.

I also informed leeku about the existence of the port.

If you are interested in the port or parts of it see l3 subtree in my repo...

branch https://github.com/xauser/tmk_keyboard/tree/xauser
commit https://github.com/xauser/tmk_keyboard/commit/1d6ecd1d87a213fe74c676e31ba6038cb438a305

Offline Ngt

  • * Elevated Elder
  • Thread Starter
  • Posts: 2346
  • Location: Switzerland
Re: Flash TMK firmware on b.face PCB
« Reply #15 on: Wed, 22 June 2016, 04:21:57 »
I ported tmk to the Leeku/LifeZone l3 compact pcb. This was a real pita as I had no experience with debugging an atmega32a which
was already soldered on a pcb and usart was not available. This port also required some changes (ifdefs) to tmk core and doesn't support
all fancy features that the original firmware does.

So, it is possible to port tmk to atmega32a based boards but it's also a lot of work.


Do you remember what are the missing features?


I have no interest in making it work if I cannot do what I want in the end.

Original l3 firmware supports ps2 and usb protocol, I've only ported usb protocol using vusb.
There are also endless led modes in original firmware (flashing, breathing, by keypress) I only
ported color change and on off.

I also had to disable some power saving features of tmk core that weren't available on the atmega32a.

To get spacefn to work I had to patch timer code in tmk core as well. I have my port running for
some months now and are quite happy with the result. Keyboard works with spacefn over usb protocol
with basic led features. That's fine for me and I stopped working any further on the port.

I also informed leeku about the existence of the port.

If you are interested in the port or parts of it see l3 subtree in my repo...

branch https://github.com/xauser/tmk_keyboard/tree/xauser
commit https://github.com/xauser/tmk_keyboard/commit/1d6ecd1d87a213fe74c676e31ba6038cb438a305


I haven't had time to dive in it yet but here are some questions I have in mind:
  • Can it be flashed just like the original TMK firmware?
  • Is it possible that it harms the PCB? In case it doesn't work, is there a way to "roll back" to the previous firmware?
Thanks for linking me your port.  :thumb:

Silenced Novatouch w/ Hack'd by Geeks

Sold: Ducky Zero Shine (Brown) | Poker 2 (Blue) | HHKB 55g Type-S

Offline xauser

  • Posts: 97
Re: Flash TMK firmware on b.face PCB
« Reply #16 on: Wed, 22 June 2016, 10:44:28 »
I haven't had time to dive in it yet but here are some questions I have in mind:
  • Can it be flashed just like the original TMK firmware?
  • Is it possible that it harms the PCB? In case it doesn't work, is there a way to "roll back" to the previous firmware?

Flashing works a bit different but that's because of the chip and the bootloader and not because of TMK. As the chip on these boards doesn't know anything about your vusb stuff you have to create your own bootloader that knows your electrical pins connected to usb port and how you want to trigger flashing (key combination on chip startup). To flash tmk firmware you have to use a tool called bootloadHID. The l3 subtree of my repo contains all you need to create your own vusb bootloader that will only work on this type of board. The l3 is a complex pcb with led sub controller attached by i2c to the main chip speaking a special protocol. You may not need this part of my port for your project.

There is no warranty for this. I did this to have tmk on a LZCP board with spacefn. All I can say is that it's working fine
since 6 months. You will need some c skills and a multimeter to process.

If there is a way back once you've touched the chip by a programmer depends on your manufacturer support. If bootloader and firmware is available then there is a way back.

Offline Ngt

  • * Elevated Elder
  • Thread Starter
  • Posts: 2346
  • Location: Switzerland
Re: Flash TMK firmware on b.face PCB
« Reply #17 on: Thu, 23 June 2016, 04:09:43 »
I haven't had time to dive in it yet but here are some questions I have in mind:
  • Can it be flashed just like the original TMK firmware?
  • Is it possible that it harms the PCB? In case it doesn't work, is there a way to "roll back" to the previous firmware?

Flashing works a bit different but that's because of the chip and the bootloader and not because of TMK. As the chip on these boards doesn't know anything about your vusb stuff you have to create your own bootloader that knows your electrical pins connected to usb port and how you want to trigger flashing (key combination on chip startup). To flash tmk firmware you have to use a tool called bootloadHID. The l3 subtree of my repo contains all you need to create your own vusb bootloader that will only work on this type of board. The l3 is a complex pcb with led sub controller attached by i2c to the main chip speaking a special protocol. You may not need this part of my port for your project.

There is no warranty for this. I did this to have tmk on a LZCP board with spacefn. All I can say is that it's working fine
since 6 months. You will need some c skills and a multimeter to process.

If there is a way back once you've touched the chip by a programmer depends on your manufacturer support. If bootloader and firmware is available then there is a way back.


Thanks for all the info. I must admit I don't feel that confident doing it. :/

Silenced Novatouch w/ Hack'd by Geeks

Sold: Ducky Zero Shine (Brown) | Poker 2 (Blue) | HHKB 55g Type-S