Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
commit
a4ff9f2567
@ -0,0 +1,9 @@
|
||||
@echo off
|
||||
setx /M path "%PATH%;C:\MinGW\bin;C:\MinGW\msys\1.0\bin" > nul 2>&1
|
||||
if NOT ["%errorlevel%"]==["0"] (
|
||||
echo FAILED. Rerun with administrator privileges.
|
||||
pause
|
||||
) else (
|
||||
echo Success!
|
||||
pause
|
||||
)
|
@ -0,0 +1,41 @@
|
||||
@echo off
|
||||
setx /M test test > nul 2>&1
|
||||
if NOT ["%errorlevel%"]==["0"] (
|
||||
echo FAILED. Rerun with administrator privileges.
|
||||
pause
|
||||
exit
|
||||
)
|
||||
|
||||
echo ------------------------------------------
|
||||
echo Installing wget and unzip
|
||||
echo ------------------------------------------
|
||||
mingw-get install msys-wget-bin msys-unzip-bin
|
||||
cd \MinGW\bin
|
||||
|
||||
mkdir temp
|
||||
cd temp
|
||||
echo ------------------------------------------
|
||||
echo Installing dfu-programmer.
|
||||
echo ------------------------------------------
|
||||
wget http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip
|
||||
unzip dfu-programmer-win-0.7.2.zip
|
||||
copy dfu-programmer.exe ..
|
||||
|
||||
echo ------------------------------------------
|
||||
echo Downloading driver
|
||||
echo ------------------------------------------
|
||||
wget http://iweb.dl.sourceforge.net/project/libusb-win32/libusb-win32-releases/1.2.6.0/libusb-win32-bin-1.2.6.0.zip
|
||||
unzip libusb-win32-bin-1.2.6.0.zip
|
||||
cp libusb-win32-bin-1.2.6.0\bin\x86\libusb0_x86.dll ../libusb0.dll
|
||||
|
||||
echo ------------------------------------------
|
||||
echo Installing driver. Accept prompt.
|
||||
echo ------------------------------------------
|
||||
pnputil -i -a dfu-prog-usb-1.2.2\atmel_usb_dfu.inf
|
||||
|
||||
cd ..
|
||||
rm -rf temp
|
||||
|
||||
echo ------------------------------------------
|
||||
echo Finished!
|
||||
pause
|
@ -0,0 +1,55 @@
|
||||
# Build Guide
|
||||
|
||||
## Build Environment Setup
|
||||
|
||||
### Windows
|
||||
1. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
|
||||
2. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location.
|
||||
3. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer.
|
||||
4. Right-click on the 1-setup-path-win batch script, select "Run as administrator", and accept the User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up.
|
||||
5. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete!
|
||||
|
||||
### Mac
|
||||
If you're using [homebrew,](http://brew.sh/) you can use the following commands:
|
||||
|
||||
brew tap osx-cross/avr
|
||||
brew install avr-libc
|
||||
brew install dfu-programmer
|
||||
|
||||
This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line.
|
||||
|
||||
You can also try these instructions:
|
||||
|
||||
1. Install Xcode from the App Store.
|
||||
2. Install the Command Line Tools from `Xcode->Preferences->Downloads`.
|
||||
3. Install [DFU-Programmer][dfu-prog].
|
||||
|
||||
### Linux
|
||||
Install AVR GCC and dfu-progammer with your favorite package manager.
|
||||
|
||||
Debian/Ubuntu example:
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc-avr dfu-programmer
|
||||
|
||||
### Vagrant
|
||||
If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [VAGRANT_GUIDE file](VAGRANT_GUIDE.md).
|
||||
|
||||
## Verify Your Installation
|
||||
1. If you haven't already, obtain this repository ([https://github.com/jackhumbert/qmk_firmware](https://github.com/jackhumbert/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application.
|
||||
2. Open up a terminal or command prompt and navigate to the qmk_firmware folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead.
|
||||
3. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `README.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboard/`. For example, if you're building for a Planck, run `cd keyboard/planck`.
|
||||
4. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process.
|
||||
|
||||
## Customizing, Building, and Deploying Your Firmware
|
||||
1. Running the `make` command from your keyboard's folder will generate a .hex file based on the default keymap. All keymaps for a particular keyboard live in the `keymaps` folder in that keyboard's folder. To create your own keymap, copy `keymaps/default/keymap.c` to the `keymaps` folder, and rename it with your name, for example jack.c. Or, if you don't care about the ability to share your keymap with the community via GitHub, you can just modify the default keymap itself. Details on how to program keymap files can be found in other guides.
|
||||
2. To build a keymap other than the default, type `KEYMAP=<name>` after `make`. So if I've named my keymap jack.c, the full command would be `make KEYMAP=jack`.
|
||||
3. How you deploy the firmware will depend on whether you are using a PCB or a Teensy. In both cases, you'll need to put the keyboard in bootloader mode, either by pressing a button on the PCB/Teensy or pressing the key with the `RESET` keycode. Then, if you're using a PCB, just run `make KEYMAP=<name> dfu` to both build and deploy the firmware. If you're using a Teensy, you'll probably need to take the <keyboardname>.hex file that make produces in the keyboard's folder, and deploy it using the [Teensy Loader.](https://www.pjrc.com/teensy/loader.html)
|
||||
|
||||
## Helpful Tips
|
||||
1. On Linux or OS X, you can run `sleep 5; make KEYMAP=<name> dfu` to delay building/deploying the firmware until for 5 seconds, giving you a chance to put the firmware into bootloader mode. You can change the 5 to any number of seconds.
|
||||
|
||||
## Troubleshooting
|
||||
1. Try running `make clean` if the make command fails.
|
||||
|
||||
WIP
|
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
#a tool to fix broken keymaps as a result of pull request #190
|
||||
#changing the declaration of matrix_scan_user() and matrix_init_user()
|
||||
#
|
||||
#This script will save a copy of the specified keymap as keymap.c.bak
|
||||
#and then create a new keymap.c with the definion corrected.
|
||||
#this script must be run from the ergodox_ez directory
|
||||
if [ $# -ne 1 ]; then
|
||||
echo $0: usage: ./190hotfix keymap_name
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Saving backup as ./keymaps/$1/keymap.c.bak ...
|
||||
mv ./keymaps/$1/keymap.c ./keymaps/$1/keymap.c.bak
|
||||
|
||||
echo Modifying ./keymaps/$1/keymap.c ...
|
||||
cat ./keymaps/$1/keymap.c.bak | sed -r 's/^void \* matrix_/void matrix_/'>./keymaps/$1/keymap.c
|
||||
|
||||
echo Complete!
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 546 KiB After Width: | Height: | Size: 95 KiB |
Binary file not shown.
Before Width: | Height: | Size: 563 KiB After Width: | Height: | Size: 379 KiB |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,190 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
|
||||
/*
|
||||
* Ordinary Ergodox EZ keyboard layout, v1
|
||||
* modifications from default by Nicholas Keene ergodoxez@nicholaskeene.com
|
||||
* Details: http://nicholas.rinard.us/2016/03/ergodox-ez-layout.html
|
||||
*/
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | Grv | 1 | 2 | 3 | 4 | 5 | ESC | | = | 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Tab | Q | W | E | R | T | \ | | / | Y | U | I | O | P | ~L2 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | ~L1 | A | S | D | F | G |------| |------| H | J | K | L |; / L2| ~L1 |
|
||||
* |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |'/Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |LCtrl | Meh |Hyper | LAlt | LGui | | RGui | RAlt | Hyper| Meh |RCtrl |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,---------------. ,---------------.
|
||||
* | Home | End | | Left | Right |
|
||||
* ,------|--------|------| |------+--------+------.
|
||||
* | | | PgUp | | Up | | |
|
||||
* |Backsp| Del |------| |------| Enter | Space|
|
||||
* | | | PgDn | | Down | | |;
|
||||
* `----------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = KEYMAP( // layer 0 : default
|
||||
// left hand
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSLS,
|
||||
KC_FN1, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT,CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_LBRC,
|
||||
KC_LCTL,MEH_T(KC_NO),ALL_T(KC_NO),KC_LALT,KC_LGUI,
|
||||
KC_HOME, KC_END,
|
||||
KC_PGUP,
|
||||
KC_BSPC, KC_DEL, KC_PGDN,
|
||||
// right hand
|
||||
KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
KC_SLSH, KC_Y, KC_U, KC_I, KC_O, KC_P, LT(MDIA, KC_SLSH),
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_FN1,
|
||||
KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_QUOT),KC_RSFT,
|
||||
KC_RGUI, KC_RALT, ALL_T(KC_NO),MEH_T(KC_NO), KC_RCTL,
|
||||
KC_LEFT, KC_RGHT,
|
||||
KC_UP,
|
||||
KC_DOWN, KC_ENT, KC_SPC
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | CAPS | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | CAPS |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | . | 0 | = | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
|
||||
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
|
||||
KC_CAPS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
|
||||
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
|
||||
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_CAPS,
|
||||
KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 2: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | Sleep| | | | | |MyComp| Mail | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp |ScrlUp| |ScrlUp| |ScrlUp| | | | | Mute | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | |MsDown|ScrlDn| |ScrlDn| |ScrlDn| | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | Lclk | Rclk | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | Stop |Refrsh| | Prev | Next |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* |Brwser|Brwser| Home | |VolUp | | |
|
||||
* |Back | Fwd |------| |------| Stop | Play |
|
||||
* | | |Search| |VolDn | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
[MDIA] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLEP,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_WH_U, KC_TRNS, KC_WH_U,
|
||||
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_D, KC_TRNS, KC_TRNS, KC_WH_D,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_WH_D,
|
||||
KC_WSTP, KC_WREF,
|
||||
KC_WHOM,
|
||||
KC_WBAK, KC_TRNS, KC_WSCH,
|
||||
// right hand
|
||||
KC_WSCH, KC_TRNS, KC_TRNS, KC_TRNS, KC_MYCM, KC_MAIL, KC_TRNS,
|
||||
KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_WH_D, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_MPRV, KC_MNXT,
|
||||
KC_VOLU,
|
||||
KC_VOLD, KC_MSTP, KC_MPLY
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
switch (layer) {
|
||||
// TODO: Make this relevant to the ErgoDox EZ.
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 91 KiB |
@ -0,0 +1,5 @@
|
||||
# The Ordinary Layout. for users of common keyboards
|
||||
|
||||
You can read more about the reasoning behind this layout over at [Nicholas's blog](http://nicholas.rinard.us/2016/03/ergodox-ez-layout.html). The idea is to make a layout that's as familiar as possible for users of "regular" keyboards.
|
||||
|
||||
![Ordinary layout](ordinary.png)
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,134 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define BASE 0
|
||||
#define SYMB 1
|
||||
#define PLVR 2
|
||||
#define ARRW 3
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[BASE] = KEYMAP(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F14,
|
||||
KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, TG(PLVR),
|
||||
CTL_T(KC_ESC), KC_A, KC_S, KC_E, KC_T, KC_G,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC,
|
||||
KC_F1, KC_F2, KC_F3, KC_LALT, KC_LGUI,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_MUTE,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLU,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), KC_FN1,
|
||||
//
|
||||
/*-*/ KC_F15, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
|
||||
/*-*/ KC_BSLS, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_MINS,
|
||||
/*-*/ /*-*/ KC_Y, KC_N, KC_I, KC_O, KC_H, KC_ENT,
|
||||
/*-*/ KC_RBRC, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
/*-*/ /*-*/ /*-*/ KC_RGUI, KC_RALT, KC_F4, KC_F5, KC_F6,
|
||||
KC_MPLY, KC_MNXT,
|
||||
KC_MPRV,
|
||||
KC_FN3, KC_QUOT, KC_SPC
|
||||
),
|
||||
[SYMB] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS,
|
||||
KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
//
|
||||
/*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
/*-*/ KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
|
||||
/*-*/ /*-*/ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
|
||||
/*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
/*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
[PLVR] = KEYMAP(
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS,
|
||||
KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
||||
KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ KC_C, KC_V, KC_NO,
|
||||
//
|
||||
/*-*/ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
/*-*/ KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO,
|
||||
/*-*/ /*-*/ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
|
||||
/*-*/ KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
/*-*/ /*-*/ /*-*/ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_NO, KC_N, KC_M
|
||||
),
|
||||
[ARRW] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS,
|
||||
/*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
//
|
||||
/*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
/*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
/*-*/ /*-*/ KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS,
|
||||
/*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
/*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[SYMB] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Momentary Symbols Layer
|
||||
[PLVR] = ACTION_LAYER_TAP_TOGGLE(PLVR), // FN2 - Momentary Plover Layer
|
||||
[ARRW] = ACTION_LAYER_TAP_TOGGLE(ARRW), // FN3 - Momentary Arrows Layer
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
};
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
switch (layer) {
|
||||
case SYMB:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case PLVR:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case ARRW:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
@ -0,0 +1,43 @@
|
||||
# Roman's Layout
|
||||
|
||||
There are four layers:
|
||||
|
||||
- **BASE** is [Norman layout](https://normanlayout.info/).
|
||||
- **SYMB** for numbers and symbols.
|
||||
- **PLVR** is optimized for [Plover](http://www.openstenoproject.org).
|
||||
- **ARRW** for navigation.
|
||||
|
||||
[![keyboard-layout](romanzolotarev-norman-plover-osx.png)](http://www.keyboard-layout-editor.com/#/gists/8ebcb701ecb763944417)
|
||||
|
||||
## Switching
|
||||
|
||||
- Tap `SYMB` to toggle **SYMB**.
|
||||
- Tap `ARRW` to toggle **ARRW**.
|
||||
- Hold `SYMB` (or `ARRW`) to activate **SYMB** (or **ARRW**) while holding.
|
||||
- Tap `PLVR` to toggle **PLVR**.
|
||||
|
||||
## LEDs
|
||||
|
||||
- Red: SYMB is on.
|
||||
- Green: PLVR is on.
|
||||
- Blue: ARRW is on.
|
||||
|
||||
## Functional Keys
|
||||
|
||||
- Tap `F1` to mute microphone via [Shush](http://mizage.com/shush/).
|
||||
- Tap `F2` to copy screenshot to the clipboard.
|
||||
- Hold `SHIFT` and tap `F2` to save screenshot as a file.
|
||||
- Tap `F3`, `F4`, `F5`, `F6` to resize a window via [Divvy](http://mizage.com/divvy/).
|
||||
- Tap `F14`, `F15` to adjust display brightness.
|
||||
|
||||
## CTRL/ESC
|
||||
|
||||
Both of those keys are frequently used in Vim.
|
||||
|
||||
- Tap `CTRL/ESC` to send `ESC`.
|
||||
- Hold `CTRL/ESC` to use as `CTRL`.
|
||||
|
||||
## Activate N-rollover
|
||||
|
||||
- While in **BASE** hold left `SHIFT` and right `SHIRT` and then tap `N`.
|
||||
- Then you can activate **PLVR** and use ErgoDox EZ for steno.
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 127 KiB |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
#a quick tool to rebuild all the hex files for the keymaps in the ./keymaps/ directory
|
||||
make clean
|
||||
for f in ./keymaps/*
|
||||
do
|
||||
MAPNAME=$(echo "$f"|sed -r 's#^./keymaps/##')
|
||||
make KEYMAP=$MAPNAME
|
||||
mv ergodox_ez.hex "$f/$MAPNAME.hex"
|
||||
done
|
@ -0,0 +1,352 @@
|
||||
#Planck Advanced (but not too advanced) `cygwin` Users Guide
|
||||
If you are a user of the [cygwin environment](https://cygwin.com) in Windows and want the freedom to use the latest tools available, then this is the guide for you. If compiling your own copy of the latest and greatest Gnu C Compiler makes you super happy, then this is the guide for you. If the command line make you smile, then this is the guide for you.
|
||||
|
||||
This guide was written step by step as I went through the process on a `Windows 10` `x86_64` and a `Windows 7` `amd k10` based system. This should be generally applicable to to any `Windows` environment with `cygwin`.
|
||||
|
||||
#####Do not skip steps. Do not move past a step until the previous step finishes successfully.
|
||||
|
||||
Based on [avr-libc installation guide](http://www.nongnu.org/avr-libc/user-manual/install_tools.html)
|
||||
|
||||
##Get the Required Packages
|
||||
Download the `cygwin` setup ([x86_64](https://cygwin.com/setup-x86_64.exe)) and install the default system plus the following if they are not already selected:
|
||||
- devel/git
|
||||
- devel/gcc-core
|
||||
- devel/gcc-g++
|
||||
- devel/flex
|
||||
- devel/bison
|
||||
- devel/make
|
||||
- devel/texinfo
|
||||
- devel/gettext-devel
|
||||
- devel/automake
|
||||
- devel/autoconfig
|
||||
- devel/libtool
|
||||
- text/gettext
|
||||
- libs/libgcc1
|
||||
- interpreters/m4
|
||||
- web/wget
|
||||
- archive/unzip
|
||||
|
||||
The following sources will be required:
|
||||
- [gmp](https://gmplib.org/) (6.1.0)
|
||||
- [mpfr](http://www.mpfr.org/) (3.1.4)
|
||||
- [mpc](http://www.multiprecision.org/) (1.0.3)
|
||||
- [binutils](https://www.sourceware.org/binutils/) (2.26)
|
||||
- [gcc](https://gcc.gnu.org/) (5.3.0)
|
||||
- [avr-libc](http://www.nongnu.org/avr-libc/) (2.0.0)
|
||||
|
||||
The `dfu-programmer` will be required to flash the new firmware
|
||||
- [dfu-programmer](https://dfu-programmer.github.io/) (0.7.2)
|
||||
|
||||
The set of commands below will create a directory (`~/local/avr`) for the sources you compile to be installed on the machine and a directory (`~/src`) for these source files to be stored. The commands then download the sources of the needed packages and unpack them. Note: the expand commands are different depending on if the packages are offered as a `bz2` or `gz` archive
|
||||
```
|
||||
$ mkdir ~/local
|
||||
$ mkdir ~/local/avr
|
||||
$ mkdir ~/src
|
||||
$ cd ~/src
|
||||
$ wget https://gmplib.org/download/gmp/gmp-6.1.0.tar.bz2
|
||||
$ wget http://www.mpfr.org/mpfr-3.1.4/mpfr-3.1.4.tar.bz2
|
||||
$ wget ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz
|
||||
$ wget http://ftp.gnu.org/gnu/binutils/binutils-2.26.tar.gz
|
||||
$ wget http://mirror0.babylon.network/gcc/releases/gcc-5.3.0/gcc-5.3.0.tar.gz
|
||||
$ wget http://download.savannah.gnu.org/releases/avr-libc/avr-libc-2.0.0.tar.bz2
|
||||
$ tar -xjf gmp-6.1.0.tar.bz2
|
||||
$ tar -xjf mpfr-3.1.4.tar.bz2
|
||||
$ tar -zxf mpc-1.0.3.tar.gz
|
||||
$ tar -zxf binutils-2.26.tar.gz
|
||||
$ tar -zxf gcc-5.3.0.tar.gz
|
||||
$ tar -xjf avr-libc-2.0.0.tar.bz2
|
||||
```
|
||||
|
||||
##Setup the Build Environment
|
||||
These commands will set up the install directory and the `PATH` variable, which will allow you to access your installed packages. Note: if you close the `cygwin` terminal window, you will need to rerun these commands, they are not permanent.
|
||||
```
|
||||
$ PREFIX=$HOME/local/avr
|
||||
$ export PREFIX
|
||||
$ PATH=/usr/local/bin:/usr/local/lib:/usr/local/include:/bin:/lib:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS
|
||||
$ PATH=$PATH:$PREFIX/bin:$PREFIX/lib
|
||||
$ export PATH
|
||||
```
|
||||
|
||||
##The `gcc` Required Math Library Packages
|
||||
The following packages are required to be complied and installed in order to compile `gcc`. They are not sufficiently available through the `cygwin` package system, so we have to make them ourselves. They must be complied in this order because each one depends on the previous. Verfiy that for each package, `make check` returns all passing and no fails.
|
||||
|
||||
###Build and Install `gmp`
|
||||
```
|
||||
$ cd ~/src/gmp-6.1.0
|
||||
$ ./configure --enable-static --disable-shared
|
||||
$ make
|
||||
$ make check
|
||||
$ make install
|
||||
```
|
||||
|
||||
###Build and Install `mpfr`
|
||||
```
|
||||
$ cd ~/src/mpfr-3.1.4
|
||||
$ ./configure --with-gmp-build=../gmp-6.1.0 --enable-static --disable-shared
|
||||
$ make
|
||||
$ make check
|
||||
$ make install
|
||||
```
|
||||
|
||||
###Build and Install `mpc`
|
||||
```
|
||||
$ cd ~/src/mpc-1.0.3
|
||||
$ ./configure --with-gmp=/usr/local --with-mpfr=/usr/local --enable-static --disable-shared
|
||||
$ make
|
||||
$ make check
|
||||
$ make install
|
||||
```
|
||||
|
||||
##OPTIONAL Part
|
||||
You can build and install a brand new `gcc` or you can use the one supplied by `cygwin`. This will take about 4-5 hours to compile (It is a "native build", so it does the entire build **3 times**. This takes a long while).
|
||||
|
||||
###Build and Install `gcc` for Your Machine
|
||||
```
|
||||
$ cd ~/src/gcc-5.3.0
|
||||
$ mkdir obj-local
|
||||
$ cd obj-local
|
||||
$ ../configure --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --enable-static --disable-shared
|
||||
$ make
|
||||
$ make install
|
||||
```
|
||||
##End OPTIONAL Part
|
||||
|
||||
###Build and Install `binutils` for Your Machine
|
||||
```
|
||||
$ cd ~/src/binutils-2.26
|
||||
$ mkdir obj-local
|
||||
$ cd obj-local
|
||||
$ ../configure
|
||||
$ make
|
||||
$ make install
|
||||
```
|
||||
|
||||
##Buliding `binutils`, `gcc`, and `avr-libc` for the AVR system
|
||||
Now we can make the critical stuff for compiling our firmware: `binutils`, `gcc`, and `avr-libc` for the AVR architecture. These allow us to build and manipulate the firmware for the keyboard.
|
||||
|
||||
###Build `binutils` for AVR
|
||||
If you plan to build and install `avr-gdb` also, use the `gdb` install at the end of this guide as it also builds the `binutils`
|
||||
```
|
||||
$ cd ~/src/binutils-2.26
|
||||
$ mkdir obj-avr
|
||||
$ cd obj-avr
|
||||
$ ../configure --prefix=$PREFIX --target=avr --disable-nls
|
||||
$ make
|
||||
$ make install
|
||||
```
|
||||
|
||||
###Build `gcc` for AVR
|
||||
```
|
||||
$ cd ~/src/gcc-5.3.0
|
||||
$ mkdir obj-avr
|
||||
$ cd obj-avr
|
||||
$ ../configure --prefix=$PREFIX --target=avr --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --enable-static --disable-shared --disable-nls --disable-libssp --with-dwarf2
|
||||
$ make
|
||||
$ make install
|
||||
```
|
||||
|
||||
###Build `avr-libc` for AVR
|
||||
For building the `avr-libc`, we have to specify the host build system. In my case it is `x86_64-unknown-cygwin`. You can look for build system type in the `gcc` configure notes for the proper `--build` specification to pass when you configure `avr-libc`.
|
||||
```
|
||||
$ cd ~/src/avr-libc-2.0.0
|
||||
$ ./configure --prefix=$PREFIX --build=x86_64-unknown-cygwin --host=avr
|
||||
$ make
|
||||
$ make install
|
||||
```
|
||||
|
||||
##Building 'dfu-programmer' for flashing the firmware via USB and installing the drivers
|
||||
We can either build our own, or use the precomplied binaries. The precompiled binaries don't play well with `cygwin` so it is better to build them ourselves. The procedure for the precompiled binaries is included at the end of this guide.
|
||||
|
||||
### Build and Install the `libusb`
|
||||
The `dfu-programmer` requires `libusb` so that it can interact with the USB system. These repos must be bootstrapped in order to create an appropriate `./configure` and `Makefile` for your system.
|
||||
```
|
||||
$ cd ~/src
|
||||
$ git clone https://github.com/libusb/libusb.git
|
||||
$ cd libusb
|
||||
$ ./bootstrap.sh
|
||||
$ ./configure
|
||||
$ make
|
||||
$ make install
|
||||
```
|
||||
|
||||
### Build and Install the `dfu-programmer`
|
||||
```
|
||||
$ cd ~/src
|
||||
$ git clone https://github.com/dfu-programmer/dfu-programmer.git
|
||||
$ cd dfu-programmer
|
||||
$ ./bootstrap.sh
|
||||
$ ./configure
|
||||
$ make
|
||||
$ make install
|
||||
```
|
||||
|
||||
Verify the installation with:
|
||||
```
|
||||
$ which dfu-programmer
|
||||
/usr/local/bin/dfu-programmer
|
||||
|
||||
$ dfu-programmer
|
||||
dfu-programmer 0.7.2
|
||||
https://github.com/dfu-programmer/dfu-programmer
|
||||
Type 'dfu-programmer --help' for a list of commands
|
||||
'dfu-programmer --targets' to list supported target devices
|
||||
```
|
||||
If you are not getting the above result, you will not be able to flash the firmware!
|
||||
|
||||
###Install the USB drivers
|
||||
The drivers are included in the windows binary version of [`dfu-programmer` 0.7.2](http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip).
|
||||
```
|
||||
$ cd ~/src
|
||||
$ wget http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip
|
||||
$ unzip dfu-programmer-win-0.7.2.zip -d dfu-programmer-win-0.7.2
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
The official drivers are found in [Atmel's `FLIP` installer](http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe). Download and then install `FLIP`. Upon installation, the drivers will be found in `C:\Program Files (x86)\Atmel\Flip 3.4.7\usb`.
|
||||
|
||||
Then, from an **administrator-privileged** `Windows` terminal, run the following command (adjust the path for username, etc. as necessary) and accept the prompt that pops up:
|
||||
```
|
||||
C:\> pnputil -i -a C:\cygwin64\home\Kevin\src\dfu-programmer-win-0.7.2\dfu-prog-usb-1.2.2\atmel_usb_dfu.inf
|
||||
or
|
||||
C:\> pnputil -i -a "C:\Program Files (x86)\Atmel\Flip 3.4.7\usb\atmel_usb_dfu.inf"
|
||||
```
|
||||
|
||||
This should be the result:
|
||||
```
|
||||
Microsoft PnP Utility
|
||||
|
||||
Processing inf : atmel_usb_dfu.inf
|
||||
Successfully installed the driver on a device on the system.
|
||||
Driver package added successfully.
|
||||
Published name : oem104.inf
|
||||
|
||||
|
||||
Total attempted: 1
|
||||
Number successfully imported: 1
|
||||
```
|
||||
|
||||
Alternatively, the `Windows` driver can be installed when prompted by `Windows` when the keyboard is attached. Do not let `Windows` search for a driver; specify the path to search for a driver and point it to the `atmel_usb_dfu.inf` file.
|
||||
|
||||
##Building and Flashing the Planck firmware!
|
||||
If you did everything else right. This part should be a snap! Grab the latest sources from `github`, make the Plank firmware, then flash it.
|
||||
|
||||
###Build Planck and Load the Firmware
|
||||
```
|
||||
$ cd ~/src
|
||||
$ git clone https://github.com/jackhumbert/qmk_firmware.git
|
||||
$ cd qmk_firmware/keyboard/planck
|
||||
$ make
|
||||
```
|
||||
|
||||
Make sure there are no errors. You should end up with this or something similar:
|
||||
```
|
||||
Creating load file for Flash: planck.hex
|
||||
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature planck.elf planck.hex
|
||||
|
||||
Creating load file for EEPROM: planck.eep
|
||||
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
|
||||
--change-section-lma .eeprom=0 --no-change-warnings -O ihex planck.elf planck.eep || exit 0
|
||||
|
||||
Creating Extended Listing: planck.lss
|
||||
avr-objdump -h -S -z planck.elf > planck.lss
|
||||
|
||||
Creating Symbol Table: planck.sym
|
||||
avr-nm -n planck.elf > planck.sym
|
||||
|
||||
Size after:
|
||||
text data bss dec hex filename
|
||||
18602 82 155 18839 4997 planck.elf
|
||||
|
||||
-------- end --------
|
||||
```
|
||||
|
||||
If you do not get the above, you **did not** build the firmware, and you will have nothing to flash. If you have the fresh clone from `github`, it was probably something gone wrong in this install process, go check and see what didn't work and threw errors or what steps you might have missed.
|
||||
|
||||
But if everything went OK, you are ready to flash! Press the reset button on the bottom of the Planck, wait two seconds, then:
|
||||
```
|
||||
$ make dfu
|
||||
```
|
||||
.
|
||||
.
|
||||
.
|
||||
profit!!!
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
##extra bits...
|
||||
|
||||
###Installing Precompiled `dfu-programmer` Binaries (not recommended for `cygwin`)
|
||||
To install the `dfu-programmer` from the binaries, we must get if from [the `dfu-programmer` website](https://dfu-programmer.github.io/) ([0.7.2](http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip)).
|
||||
|
||||
Copy this file into your `cygwin` home\src directory. (For me, it is `C:\cygwin64\home\Kevin\src`), extract the files, move `dfu-programmer.exe` to `~/local/avr/bin`. Most obnoxiously, the `libusb0_x86.dll` and `libusb0.sys` need to be moved from `./dfu-prog-usb-1.2.2/x86/` to a directory in the `Windows` `PATH` and the `cygwin` `PATH`. This is because the `dfu-programmer` binary is `mingw` based, not `cygwin` based, so the `dlls` do not cooperate. I achieved acceptable pathing by moving the files to `C:\cygwin64\home\Kevin\local\avr\bin` Then, in a `WINDOWS` command prompt running (Adjusting your path for username, etc. as needed):
|
||||
```
|
||||
C:\> set PATH=%PATH%;C:\cygwin64\home\Kevin\local\avr\bin
|
||||
```
|
||||
|
||||
Then, rename `libusb0_x86.dll` to `libusb0.dll`.
|
||||
|
||||
You can tell that you were successful by trying to execute 'dfu-programmer' from the 'cygwin' prompt:
|
||||
```
|
||||
$ which dfu-programmer
|
||||
/home/Kevin/local/avr/bin/dfu-programmer
|
||||
|
||||
$ dfu-programmer
|
||||
dfu-programmer 0.7.2
|
||||
https://github.com/dfu-programmer/dfu-programmer
|
||||
Type 'dfu-programmer --help' for a list of commands
|
||||
'dfu-programmer --targets' to list supported target devices
|
||||
```
|
||||
|
||||
If you are not getting the above result, you will not be able to flash the firmware!
|
||||
- Try making sure your `PATH` variables are set correctly for both `Windows` and `cygwin`.
|
||||
- Make sure the `dll` is named correctly.
|
||||
- Do not extract it with `cygwin`'s `unzip` as it does not set the executable permission. If you did it anyway, do `chmod +x dfu-programmer.exe`.
|
||||
- Still have problems? Try building it instead.
|
||||
|
||||
|
||||
##Debugging Tools
|
||||
|
||||
These tools are for debugging your firmware, etc. before flashing. Theoretically, it can save your memory from wearing out. However, these tool do not work 100% for the Planck firmware.
|
||||
|
||||
### `gdb` for AVR
|
||||
`gdb` has a simulator for AVR but it does not support all instructions (like WDT), so it immediately crashes when running the Planck firmware (because `lufa.c` disables the WDT in the first few lines of execution). But it can still be useful in debugging example code and test cases, if you know how to use it.
|
||||
|
||||
```
|
||||
$ cd ~/src
|
||||
$ git clone git://sourceware.org/git/binutils-gdb.git
|
||||
$ cd binutils-gdb
|
||||
$ mkdir obj-avr
|
||||
$ cd obj-avr
|
||||
$ ../configure --prefix=$PREFIX --target=avr --build=x86_64-unknown-cygwin --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --disable-nls --enable-static
|
||||
$ make
|
||||
$ make install
|
||||
```
|
||||
|
||||
### `simulavr`
|
||||
`simulavr` is an AVR simulator. It runs the complied AVR elfs. `simulavr` does not support the `atmega32u4` device... it does `atmega32` but that is not good enough for the firmware (no PORTE and other things), so you cannot run the Planck firmware. I use it to simulate ideas I have for features in separate test projects.
|
||||
|
||||
This one is a major pain in the butt because it has a lot of dependencies and it is buggy. I will do my best to explain it but... it was hard to figure out. A few things need to be changed in the 'Makefile' to make it work in `cygwin`.
|
||||
|
||||
|
||||
```
|
||||
$ cd ~/src
|
||||
$ git clone https://github.com/Traumflug/simulavr.git
|
||||
$ cd simulavr
|
||||
$ ./bootstrap
|
||||
$ ./configure --prefix=$PREFIX --enable-static --disable-tcl --disable-doxygen-doc
|
||||
```
|
||||
Edit `src/Makefile.am` now so that `-no-undefined` is included (I did this by removing the SYS_MINGW conditional surrounding `libsim_la_LDFLAGS += -no-undefined` and `libsimulavr_la_LDFLAGS += -no-undefined \ libsimulavr_la_LIBADD += $(TCL_LIB)`. Also, `$(EXEEXT)` is added after `kbdgentables` in two places.
|
||||
|
||||
```
|
||||
$ make
|
||||
$ make install
|
||||
```
|
||||
|
||||
|
||||
TODO:
|
||||
- git repos for all sources
|
||||
- command line magic for cygwin setup
|
||||
- better options for `dfu-drivers`
|
@ -0,0 +1,49 @@
|
||||
#include "keymap_common.h"
|
||||
|
||||
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC,
|
||||
LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT,
|
||||
LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, FN3,
|
||||
ESC, DEL, LALT, LGUI, FN2, SPC, FN1, LEFT, DOWN, UP, RGHT),
|
||||
[1] = KEYMAP(
|
||||
GRV, GRV, FN22, FN19, FN10, TRNS, TRNS, 7, 8, 9, 0, BSPC,
|
||||
TRNS, LBRC, RBRC, FN23, FN24, TRNS, TRNS, 4, 5, 6, TRNS, BSLS,
|
||||
TRNS, MINS, FN20, EQL, FN21, TRNS, TRNS, 1, 2, 3, TRNS, ENT,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, SPC, FN1, TRNS, PGDN, PGUP, TRNS),
|
||||
[2] = KEYMAP(
|
||||
FN26, FN10, FN11, FN12, FN13, FN14, FN15, FN17, FN18, FN19, FN10, DEL,
|
||||
TRNS, TRNS, MUTE, VOLD, VOLU, TRNS, BSPC, FN14, FN15, FN16, TRNS, FN25,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN11, FN12, FN13, TRNS, ENT,
|
||||
TRNS, TRNS, TRNS, TRNS, FN2, ENT, TRNS, TRNS, PGDN, PGUP, TRNS),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_MOMENTARY(1), // Switch layer raise
|
||||
[2] = ACTION_LAYER_MOMENTARY(2), // Switch layer lower
|
||||
|
||||
[3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // Right shift serves as Enter on tap
|
||||
|
||||
// Numeric shift modifiers
|
||||
[10] = ACTION_MODS_KEY(MOD_LSFT, KC_0),
|
||||
[11] = ACTION_MODS_KEY(MOD_LSFT, KC_1),
|
||||
[12] = ACTION_MODS_KEY(MOD_LSFT, KC_2),
|
||||
[13] = ACTION_MODS_KEY(MOD_LSFT, KC_3),
|
||||
[14] = ACTION_MODS_KEY(MOD_LSFT, KC_4),
|
||||
[15] = ACTION_MODS_KEY(MOD_LSFT, KC_5),
|
||||
[16] = ACTION_MODS_KEY(MOD_LSFT, KC_6),
|
||||
[17] = ACTION_MODS_KEY(MOD_LSFT, KC_7),
|
||||
[18] = ACTION_MODS_KEY(MOD_LSFT, KC_8),
|
||||
[19] = ACTION_MODS_KEY(MOD_LSFT, KC_9),
|
||||
|
||||
// Other shift modifiers
|
||||
[20] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // _
|
||||
[21] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), // +
|
||||
[22] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // ~
|
||||
[23] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), // {
|
||||
[24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), // }
|
||||
[25] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // |
|
||||
|
||||
// Switch windows in app
|
||||
[26] = ACTION_MODS_KEY(MOD_LGUI, KC_GRV),
|
||||
};
|
@ -0,0 +1,163 @@
|
||||
/*
|
||||
This is the keymap of /u/deepshitgoeshere!
|
||||
Layer 1 exists so I can have the symbol positions of QWERTY while having my system in german.
|
||||
The second layer has all the german umlauts I need and with capital and small letters on the
|
||||
same layer there is no need to press shift+lower.
|
||||
This keymap is made to work with software implemented QWERTZ.
|
||||
The "Gaming" layer is mainly customized for CS:GO.
|
||||
If you have any question about this keymap feel free to shoot me a message on reddit!
|
||||
*/
|
||||
|
||||
#include "keymap_common.h"
|
||||
#include "keymap_extras/keymap_german.h"
|
||||
#include "backlight.h"
|
||||
#include "debug.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = { /* Colemak
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | Esc | q | w | f | p | g | j | l | u | y | ; | - |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | BS | a | r | s | t | d | h | n | e | i | o | ' |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | SFT | z | x | c | v | b | k | m | , | . | / | Ent |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | CTL | GUI | Tab | ALT |Lower| Space |Raise|Left |Down | Up |Right|
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
{KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Z, DE_SCLN, DE_MINS},
|
||||
{KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, DE_QUOT},
|
||||
{M(0), KC_Y, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, DE_COMM, DE_DOT, DE_SLSH, KC_ENT},
|
||||
{KC_LCTL, KC_LGUI, KC_TAB, KC_LALT, F(2), F(3), F(3), F(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
[1] = { /* Symbols
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | : | |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | " |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | | | | | | < | > | ? | |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_DOT, KC_TRNS},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_DQOT},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), DE_MORE, DE_QST, KC_TRNS},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
|
||||
},
|
||||
[2] = { /* Raise
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | | Ä | | | | | | | Ü | Ö | |Game |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | Del | ä | | ß | | | | | ü | ö | |FVol+|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | | | | | |Stop | Prv | Nxt |FVol-|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* |LCTL |LGUI | Tab |LALT |Lower| Space | |Mute |Vol- |Vol+ | P/P |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
{KC_NO, S(DE_AE), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, S(DE_UE), S(DE_OE), KC_NO, F(4)},
|
||||
{KC_DEL, DE_AE, KC_NO, DE_SS, KC_NO, KC_NO, KC_NO, KC_NO, DE_UE, DE_OE, KC_NO, RALT(KC_F12)},
|
||||
{KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MSTP, KC_MPRV, KC_MNXT, RALT(KC_F11)},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
[3] = { /* Lower
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | + |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | = |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | | | [ | ] | { | } | € | | \ | Ent |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* |LCTL |LGUI | Tab |LALT | | Space |Raise|Home |PgDn |PgUp | End |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
{DE_TILD, DE_EXLM, DE_AT, DE_HASH, DE_DLR, DE_PERC, DE_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, DE_PLUS},
|
||||
{DE_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_EQL},
|
||||
{KC_NO, KC_NO, KC_NO, DE_PIPE, DE_LBRC, DE_RBRC, DE_LCBR, DE_RCBR, DE_EURO, KC_NO, DE_BSLS, KC_ENT},
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
|
||||
},
|
||||
[4] = { /* Function
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | | | | KP- | KP+ | | | | |Reset|
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | |Light|BL DN|BL UP| | | | |Mute |Vol- |Vol+ | P/P |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
{KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24},
|
||||
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
|
||||
{KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PMNS, KC_PPLS, KC_NO, KC_NO, KC_NO, RESET, KC_NO},
|
||||
{KC_NO, BL_TOGG, BL_DEC, BL_INC, FUNC(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
[5] = { /* Gaming
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | Buy | ESC | q | w | e | r | t | y | u | i | o | p |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | ENT | BS | a | s | d | f | g | h | j | k | l | ; |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | CTL | SFT | z | x | c | v | b | n | m | , | Up | / |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | Tab | ALT | | Space |CrJmp| GUI |Left |Down |Right|
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
{MO(6), KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, F(4)},
|
||||
{KC_ENT, KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_SCLN},
|
||||
{KC_LCTL, KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, DE_DOT, KC_UP, DE_SLSH},
|
||||
{KC_NO, KC_NO, KC_TAB, KC_LALT, KC_NO, KC_SPC, KC_SPC, LCTL(KC_SPC), KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT}
|
||||
},
|
||||
[6] = { /* Gaming
|
||||
/* CS:GO buy binds
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | | | | | | | | | 7 | 8 | 9 | |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | BS | | | | | | | | 6 | 5 | 4 | End |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | CTL | SFT | | | | | | | 1 | 2 | 3 |Pgdn |
|
||||
* |-----------------------------------------------------------------------|
|
||||
* | | | Tab | ALT | | Space |CrJmp| | 0 | KP+ |PEnt |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
{KC_TRNS, KC_NO, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_P7, KC_P8, KC_P9, KC_NO},
|
||||
{KC_BSPC, KC_NO, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_P4, KC_P5, KC_P6, KC_END},
|
||||
{KC_LCTL, KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_K, KC_P1, KC_P2, KC_P3, KC_PGDN},
|
||||
{KC_NO, KC_NO, KC_TAB, KC_LALT, KC_NO, KC_SPC, KC_SPC, LCTL(KC_SPC), KC_NO, KC_P0, KC_PDOT, KC_PENT}
|
||||
},
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_MOMENTARY(2), // to RAISE
|
||||
[2] = ACTION_LAYER_MOMENTARY(3), // to LOWER
|
||||
[3] = ACTION_LAYER_TAP_KEY(4,KC_SPC), // to Function
|
||||
[4] = ACTION_LAYER_TOGGLE(5), // toggle Gaming
|
||||
[5] = ACTION_MODS_TAP_KEY(KC_LSFT, KC_CAPS), //Shift on press, Caps on tap
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
case 0: // M(0)
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_LSFT);
|
||||
layer_on(1);
|
||||
} else {
|
||||
layer_off(1);
|
||||
unregister_code(KC_LSFT);
|
||||
}
|
||||
break;
|
||||
case 1: // M(1)
|
||||
if (record->event.pressed) {
|
||||
unregister_code(KC_LSFT);
|
||||
register_code(DE_MORE);
|
||||
} else {
|
||||
unregister_code(DE_MORE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue