a77031ca0b0c05281dc026e7f858c8b0ce3a22d7
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
- Install Kinetis Design studio (KDS), KSDK 1.3, and set them up to be able to build the USB examples.
- Export the
KSDK_DIRenvironment variable to point to the KSDK installation directory. - If you wish to use KDS then go to File -> Import -> General -> Existing Projects into Workspace, select the
builddirectory, and click on the Finish button. Next up, right click on theuhk-rightproject -> Properties -> Resource -> Linked Resources -> Path Variables -> editKSDK_DIRto point to your KSDK installation directory. - At this point you can build the firmware by using KDS or at the command line by using the scripts of the build directory.
Known bugs
The USB device does not enumerate properly, yielding the following errors on Linux:
[25630.799145] usb 1-11: new full-speed USB device number 96 using xhci_hcd
[25635.906816] usb 1-11: device descriptor read/64, error -71
[25636.122623] usb 1-11: device descriptor read/64, error -71
[25636.338444] usb 1-11: new full-speed USB device number 97 using xhci_hcd
[25636.450357] usb 1-11: device descriptor read/64, error -71
[25636.666170] usb 1-11: device descriptor read/64, error -71
[25636.882022] usb 1-11: new full-speed USB device number 98 using xhci_hcd
[25636.882170] usb 1-11: Device not responding to setup address.
[25637.085938] usb 1-11: Device not responding to setup address.
[25637.289680] usb 1-11: device not accepting address 98, error -71
[25637.401584] usb 1-11: new full-speed USB device number 99 using xhci_hcd
[25637.401745] usb 1-11: Device not responding to setup address.
[25637.605469] usb 1-11: Device not responding to setup address.
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
Description
Languages
C
90.8%
C++
3.6%
Linker Script
3.3%
Makefile
1.9%
JavaScript
0.4%