]> git.gir.st - tmk_keyboard.git/blob - tmk_core/protocol/chibios/README.md
Add basic sleep_led for chibios.
[tmk_keyboard.git] / tmk_core / protocol / chibios / README.md
1 ## USB stack implementation using ChibiOS
2
3 ### Notes
4
5 - To use, unpack or symlink ChibiOS here, to `chibios`.
6 - For gcc options, inspect `chibios.mk`. For instance, I enabled `-Wno-missing-field-initializers`, because TMK common bits generated a lot of hits on that.
7 Also pay attention to `-O0` (enabled for debugging); for deployment use `-O2`.
8 - USB string descriptors are a mess. I did not find a way to cleanly generate the right structures from actual strings, so the definitions in individual keyboards' `config.h` are ugly as heck.
9 - There are some random constants left so far, e.g. 5ms sleep between calling `keyboard_task` in `main.c`. There should be no such in `usb_main.c`. Everything is based on timers/interrupts/kernel scheduling (well except `keyboard_task`), so no periodically called things (again, except `keyboard_task`, which is just how TMK is designed).
10 - It is easy to add some code for testing (e.g. blink LED, do stuff on button press, etc...) - just create another thread in `main.c`, it will run independently of the keyboard business.
11 - Jumping to bootloader works, but it is not entirely pleasant, since it is very much MCU dependent. The code is now geared towards STM32 chips and their built-in bootloaders. So, one needs to dig out the right address to jump to, and pass it to the compiler in the `Makefile`. Also, a patch to upstream ChibiOS is needed (supplied), because it `ResetHandler` needs adjusting.
12 - Sleep LED works, but at the moment only on/off, i.e. no breathing.
13 - The USB stack works pretty completely; however there are bits of other TMK stuff that are not done yet:
14
15 ### Immediate todo
16
17 - power saving for suspend?
18 - PWM for sleep led
19
20 ### Not tested, but possibly working
21
22 - backlight
23
24 ### Missing / not working (TMK vs ChibiOS bits)
25
26 - eeprom / bootmagic (will be chip dependent; eeprom needs to be emulated in flash, which means less writes; wear-levelling?)
27
28 ### Tried with
29
30 - ChibiOS 3.0.1 and ST F072RB DISCOVERY board.
31 - Need to test on other STM32 chips (F3, F4) to make it as much chip-independent as possible.
Imprint / Impressum