diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/build.md | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/doc/build.md b/doc/build.md index bfe5de9fd4..20702e94c9 100644 --- a/doc/build.md +++ b/doc/build.md @@ -5,23 +5,22 @@ Build Firmware and Program Controller Download and Install -------------------- ### 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]. ### 2. Download source -You can find firmware source at github: +You can find firmware source at github: - <https://github.com/tmk/tmk_keyboard> -If you are familiar with `Git` tools you are recommended to use it but you can also download zip archive from: +If you are familiar with `Git` tools you are recommended to use it but you can also download zip archive from: - <https://github.com/tmk/tmk_keyboard/archive/master.zip> @@ -29,7 +28,7 @@ If you are familiar with `Git` tools you are recommended to use it but you can a Build firmware -------------- ### 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 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 $ make -f Makefile.<variant> program +[cygwin]: https://www.cygwin.com/ +[mingw]: http://www.mingw.org/ +[mhv]: https://infernoembedded.com/products/avr-tools [winavr]: http://winavr.sourceforge.net/ [crosspack]: http://www.obdev.at/products/crosspack/index.html [flip]: http://www.atmel.com/tools/FLIP.aspx @@ -116,14 +118,18 @@ Makefile Options #MCU = at90usb1286 # Teensy++ 2.0 F_CPU = 16000000 +Set your MCU and its clock in Hz. + # Boot Section Size in *bytes* # Teensy halfKay 512 # Atmel DFU loader 4096 # LUFA bootloader 4096 OPT_DEFS += -DBOOTLOADER_SIZE=4096 +If you are using PJRC Teensy use `512` for `BOOTLOADER_SIZE`, otherwise use `4096` unless you are sure. + ### 2. Features -Optional. Note that ***comment out*** to disable them. +Optional. Note that ***comment out*** with `#` to disable them. BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) @@ -152,7 +158,7 @@ Config.h Options ---------------- ### 1. Magic command key combination - #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KB_LSHIFT) | MOD_BIT(KB_RSHIFT))) + #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KB_LSHIFT) | MOD_BIT(KB_RSHIFT))) ### 2. Mechanical Locking Support for CapsLock |