Ultimate Hacking Keyboard Kinetis firmware

This repository will host the firmware of the Ultimate Hacking Keyboard, targeted at NXP Kinetis microcontrollers.

The original firmware is already functional, but it's written for AVR microcontrollers. Kinetis microcontrollers are vastly more powerful and cost the same, allowing for future growth, so a decision has been made to port the firmware.

The current code runs on an FRDM-K22F dev board and implements a composite USB device that exposes a keyboard and mouse HID interface. It was created by fusing the dev_hid_audio_bm_frdmk22f and dev_hid_keyboard_bm_frdmk22f KSDK examples.

Build

  1. Install Kinetis Design studio (KDS), KSDK 2.0 for the FRDM-K22F, and set them up to be able to build the USB examples.
  2. Export the KSDK_DIR environment variable to point to your KSDK installation directory.
  3. If you wish to use KDS then:
  • Go to File -> Import -> General -> Existing Projects into Workspace, select the build directory, and click on the Finish button
  • In Project Explorer right-click on the uhk-right project -> Properties -> Resource -> Linked Resources -> Path Variables -> edit KSDK_DIR to point to your KSDK installation directory.
  1. At this point, you can build the firmware by using KDS or at the command line by using the scripts of the build directory.

Future work

Initially, the low-level functionality has to be implemented, such as:

  • A USB device that exposes a keyboard, mouse and raw HID interface
  • Using kboot for the right keyboard half to directly interface with the host
  • Using kboot for the left keyboard half to indirectly interface with the host via the right keyboard half using UART

Next up, the features of the AVR firmware should to be ported by using an FRDM-K0[235]Z dev board acting as the left keyboard half:

  • Make the left half send keypress events to the right half via UART.
  • Implement a 2x2 keyboard matrix on for the dev boards and make it work in the firmware - make the keypresses send keycodes to the host or move the mouse.

Finally, implement all the advanced features, such as:

  • Receive USB control request to read and write the EEPROM.
  • Parse the content of the EEPROM to extract keymaps, macros, and other configuration information.
Description
No description provided
Readme 2.2 MiB
Languages
C 90.8%
C++ 3.6%
Linker Script 3.3%
Makefile 1.9%
JavaScript 0.4%