tmk / tmk_keyboard

Keyboard firmwares for Atmel AVR and Cortex-M
3.98k stars 1.7k forks source link

Fedora Linux flashing process #706

Closed BansheeHero closed 2 years ago

BansheeHero commented 2 years ago

This is mostly for posterity as there was another user here failing to flash the HEX file. There are few steps that make it harder for a new user.

If you want to compile HEX files you need the following packages on top of development tools package group sudo dnf install avra.x86_64 avr-libc.noarch avr-gcc-c++.x86_64 avr-gcc.x86_64 avr-binutils.x86_64 dfu-programmer.x86_64

How to check if your device is recognized:

$ lsusb | grep t.m.k.
Bus 001 Device 027: ID feed:005b t.m.k. USB to USB keyboard converter

Pressing the button to enter mode for programming

$ lsusb | grep atmega32u4
Bus 001 Device 026: ID 03eb:2ff4 Atmel Corp. atmega32u4 DFU bootloader

If your make dfu is stuck on waiting you are not allow terminal privileges. Press control+c to stop the thread and run the following first: sudo usermod -aG tty <YourUsername> Then get back to your flashing of firmware.

You could just use sudo for the make dfu but it is a bad practice to run scripts with escalated privileges and you are going to flash it more often than once. So it is this or at least do run with sudo on machines without sensitive data.

After flashing it will again show the original device:

$ lsusb | grep t.m.k.
Bus 001 Device 027: ID feed:005b t.m.k. USB to USB keyboard converter

Just started tinkering with it, took 2 weeks to deliver from Japan to Czechia and had to be picked up with a custom;s fee of $21 (USD)