@ -5,13 +5,12 @@ Build Firmware and Program Controller
Download and Install
Download and Install
--------------------
--------------------
### 1. Install Tools
### 1. Install Tools
First, you need tools to build firmware and program your controller. I assume you are on Windows here.
1. **Toolchain**Install [WinAVR][winavr]. This is old but works well for this purpose. `WinAVR` is a tool set to build firmware including C compiler(gcc) and make commands. You can use [CrossPack][crosspack] instead if you are on Mac.
1. **Toolchain**On Windows install [MHV AVR Tools][mhv] for AVR GCC compiler and [Cygwin][cygwin](or [MinGW][mingw]) for shell terminal. On Mac you can use [CrossPack][crosspack]. On Linux you can install AVR GCC with your favorite package manager.
2. **Programmer**Install [Atmel FLIP][flip]. `FLIP` is a tool to program(load) firmware into AVR controller via DFU bootloader. AVR USB chips including ATmega32U4 has DFU bootloader by factory default. You can also use [dfu-programmer][dfu-prog] instead if you are on Mac or Linux.
2. **Programmer**On Windows install [Atmel FLIP][flip]. On Mac and Linux install [dfu-programmer][dfu-prog].
3. **Driver**At first time you start DFU bootloader on Chip 'Found New Hardware Wizard' will come up on Windows. If you install device driver properly you can find chip name like 'ATmega32U4' under 'LibUSB-Win32 Devices' tree on 'Device Manager'. If not you shall need to update its driver on 'Device Manager'. You will find the driver in `FLIP` install directory like: C:\Program Files (x86)\Atmel\Flip 3.4.5\usb\. If you use `dfu-programmer` install its driver.
3. **Driver**On Windows you start DFU bootloader on the chip first time you will see 'Found New Hardware Wizard' to install driver. If you install device driver properly you can find chip name like 'ATmega32U4' under 'LibUSB-Win32 Devices' tree on 'Device Manager'. If not you shall need to update its driver on 'Device Manager'. You will find the driver in `FLIP` install directory like: C:\Program Files (x86)\Atmel\Flip 3.4.5\usb\. In case of `dfu-programmer` use its driver.
If you use PJRC Teensy you don't need step 2 and 3 above, just get [Teensy loader][teensy-loader].
If you use PJRC Teensy you don't need step 2 and 3 above, just get [Teensy loader][teensy-loader].
@ -29,7 +28,7 @@ If you are familiar with `Git` tools you are recommended to use it but you can a
Build firmware
Build firmware
--------------
--------------
### 1. Open terminal
### 1. Open terminal
Open terminal window to get access to commands. You can use `cmd` in Windows or `Terminal.app` on Mac OSX. In Windows press `Windows` key and `R` then enter `cmd` in 'Run command' dialog showing up.
Open terminal window to get access to commands. Use Cygwin(or MingGW) `shell terminal` in Windows or `Terminal.app` on Mac OSX. In Windows press `Windows` key and `R` then enter `cmd` in 'Run command' dialog showing up.
### 2. Change directory
### 2. Change directory
Move to project directory in the firmware source.
Move to project directory in the firmware source.
@ -100,6 +99,9 @@ You may want to use other programmer like `avrdude` with AVRISPmkII, Arduino or
@ -2,7 +2,7 @@ Alternative Controller for HHKB Pro
===================================
===================================
I wanted to add some features like vi cursor and mouse keys to my [HHKB][HHKB] but its controller is not programmable and firmware source code is not open, of course. This means customizing this keyboard needs to replace original controller with programmable one.
I wanted to add some features like vi cursor and mouse keys to my [HHKB][HHKB] but its controller is not programmable and firmware source code is not open, of course. This means customizing this keyboard needs to replace original controller with programmable one.
This controller can work with HHKB **Professional**, **Professional** 2 and **Type-S**.
This controller can work with HHKB **Professional**, **Professional** 2, **JP** and **Type-S**.
See [this thread][AltController] in geekhack.org.
See [this thread][AltController] in geekhack.org.
@ -43,7 +43,7 @@ See [doc/HHKB.txt](doc/HHKB.txt) and files under [doc/](doc/) for internal of HH
See [this document](../../doc/build.md) first.
See [this document](../../doc/build.md) first.
### Configuration
### Configuration
Set `MCU`, `BOOTLOADER_SIZE` and other build options in `Makefile` and `config.h`.
Set `MCU`, `BOOTLOADER_SIZE` and other build options in `Makefile` and `config.h`. If your target is **HHKB JP** you need to set `HHKB_JP` build option in `Makefile`.
### Build
### Build
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. Just `make` with `KEYMAP` option like:
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. Just `make` with `KEYMAP` option like:
@ -66,37 +66,22 @@ Use [Teensy Loader] if your controller is Teensy/Teensy++.
##Keymap
##Keymap
To define your own keymap create file named `keymap_<name>.c` and see keymap document(you can find in top README.md) and existent keymap files.
To define your own keymap create file named `keymap_<name>.c` and see [keymap document](../../doc/keymap.md) and existent keymap files.
##Hardware
##Hardware
You have some options for hardware. Development boards with USB AVR family(ATMega32U4, AT90USB1286) like Teensy will work while MegaAVR with [V-USB] library is also cheaper option for DIY.
You have some options for hardware. Development boards with USB AVR family(ATMega32U4, AT90USB1286) like Teensy will work while MegaAVR with [V-USB] library is also cheaper option for DIY.
###1. TMK Alt Controller Board
###1. TMK Alt Controller Board
TMK designed [Keyboard Controller Board for HHKB Pro2(KiCad project)](https://github.com/tmk/HHKB_controller).
Design files are available at [Keyboard Controller Board for HHKB(KiCad project)](https://github.com/tmk/HHKB_controller) and see [Controller Distribution thread](http://geekhack.org/index.php?topic=56494.0) if you get an assembled one.
See [this post](http://geekhack.org/index.php?topic=12047.msg948923#msg948923).
###2. PJRC Teensy
###2. PJRC Teensy++ 2.0 version
See [this thread](http://geekhack.org/index.php?topic=57008.0).