aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md12
-rw-r--r--keyboard/alps64/Makefile9
-rw-r--r--keyboard/alps64/alps64.c (renamed from keyboard/alps64/keymap_common.c)31
-rw-r--r--keyboard/alps64/alps64.h (renamed from keyboard/alps64/keymap_common.h)21
-rw-r--r--keyboard/alps64/config.h5
-rw-r--r--keyboard/alps64/keymaps/default.c4
-rw-r--r--keyboard/alps64/keymaps/hasu.c4
-rw-r--r--keyboard/alps64/matrix.c5
-rw-r--r--keyboard/gh60/Makefile10
-rw-r--r--keyboard/gh60/keymap_common.c30
-rw-r--r--keyboard/hhkb/Makefile2
-rw-r--r--keyboard/hhkb/matrix.c8
-rw-r--r--keyboard/jd45/Makefile2
-rw-r--r--keyboard/kc60_v2/Makefile158
-rw-r--r--keyboard/kc60_v2/README.md24
-rw-r--r--keyboard/kc60_v2/config.h161
-rw-r--r--keyboard/kc60_v2/kc60.c111
-rw-r--r--keyboard/kc60_v2/kc60.h36
-rw-r--r--keyboard/kc60_v2/keymaps/default.c24
-rw-r--r--keyboard/planck/.gitignore1
-rw-r--r--quantum/keymap_common.h10
-rw-r--r--quantum/matrix.c6
-rw-r--r--quantum/quantum.c13
-rw-r--r--quantum/quantum.h4
-rw-r--r--quantum/quantum.mk4
-rw-r--r--quantum/template/Makefile2
-rw-r--r--tmk_core/rules.mk14
27 files changed, 606 insertions, 105 deletions
diff --git a/README.md b/README.md
index 646fa6f2b..2c8257528 100644
--- a/README.md
+++ b/README.md
@@ -8,9 +8,17 @@ This documentation is edited and maintained by Erez Zukerman of ErgoDox EZ. If y
8 8
9The OLKB product firmwares are maintained by Jack, the Ergodox EZ by Erez, and the Clueboard by [Zach White](https://github.com/skullydazed). 9The OLKB product firmwares are maintained by Jack, the Ergodox EZ by Erez, and the Clueboard by [Zach White](https://github.com/skullydazed).
10 10
11## Important background info: TMK documentation 11## Documentation roadmap
12 12
13The documentation below explains QMK customizations and elaborates on some of the more useful features of TMK. To understand the base firmware, and especially what *layers* are and how they work, please see [TMK_README.md](/TMK_README.md). 13This is not a tiny project. While this is the main Readme, there are many other files you might want to consult. Here are some points of interest:
14
15* The Readme for your own keyboard: This is found under `keyboards/<your keyboards's name>/`. So for the ErgoDox EZ, it's [here](keyboard/ergodox_ez/); for the Atomic, it's [here](keyboard/atomic/) and so on.
16* The [build guide](BUILD_GUIDE.md), also mentioned in the next section. This is how you put your development environment together so you can compile the firmware.
17* The list of possible keycodes you can use in your keymap is actually spread out in a few different places:
18 * [tmk_core/common/keycode.h](tmk_core/common/keycode.h) - the base TMK keycodes. This is the actual source file.
19 * [tmk_core/doc/keycode.txt](tmk_core/doc/keycode.txt) - an explanation of those same keycodes.
20 * [quantum/keymap_common.h](quantum/keymap_common.h) - this is where the QMK-specific aliases are all set up. Things like the Hyper and Meh key, the Leader key, and all of the other QMK innovations. These are also explained and documented below, but `keymap_common.h` is where they're actually defined.
21* The [TMK documentation](tmk_core/doc). QMK is based on TMK, and this explains how it works internally.
14 22
15## Getting started 23## Getting started
16 24
diff --git a/keyboard/alps64/Makefile b/keyboard/alps64/Makefile
index 7634c4280..bd6ecb6b9 100644
--- a/keyboard/alps64/Makefile
+++ b/keyboard/alps64/Makefile
@@ -42,14 +42,14 @@
42TARGET = alps64 42TARGET = alps64
43 43
44# Directory common source filess exist 44# Directory common source filess exist
45TOP_DIR = ../..
45TMK_DIR = ../../tmk_core 46TMK_DIR = ../../tmk_core
46 47
47# Directory keyboard dependent files exist 48# Directory keyboard dependent files exist
48TARGET_DIR = . 49TARGET_DIR = .
49 50
50# project specific files 51# project specific files
51SRC = keymap_common.c \ 52SRC = alps64.c \
52 matrix.c \
53 led.c 53 led.c
54 54
55ifdef KEYMAP 55ifdef KEYMAP
@@ -127,8 +127,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
127 127
128# Search Path 128# Search Path
129VPATH += $(TARGET_DIR) 129VPATH += $(TARGET_DIR)
130VPATH += $(TOP_DIR)
130VPATH += $(TMK_DIR) 131VPATH += $(TMK_DIR)
131 132
132include $(TMK_DIR)/protocol/lufa.mk 133include $(TOP_DIR)/quantum/quantum.mk
133include $(TMK_DIR)/common.mk
134include $(TMK_DIR)/rules.mk
diff --git a/keyboard/alps64/keymap_common.c b/keyboard/alps64/alps64.c
index fdb1769e1..dde10c11e 100644
--- a/keyboard/alps64/keymap_common.c
+++ b/keyboard/alps64/alps64.c
@@ -14,17 +14,30 @@ GNU General Public License for more details.
14You should have received a copy of the GNU General Public License 14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 16*/
17#include "keymap_common.h" 17#include "quantum.h"
18 18
19#define LED_ON() do { DDRC |= (1<<5); PORTC |= (1<<5); } while (0)
20#define LED_OFF() do { DDRC &= ~(1<<5); PORTC &= ~(1<<5); } while (0)
21#define LED_TGL() do { DDRC |= (1<<5); PINC |= (1<<5); } while (0)
19 22
20/* translates key to keycode */ 23__attribute__ ((weak))
21uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) 24void matrix_init_user(void) {
22{ 25
23 return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); 26}
27
28__attribute__ ((weak))
29void matrix_scan_user(void) {
30
31}
32
33void matrix_init_kb(void) {
34 LED_ON();
35 _delay_ms(500);
36 LED_OFF();
37
38 matrix_init_user();
24} 39}
25 40
26/* translates Fn keycode to action */ 41void matrix_scan_kb(void) {
27action_t keymap_fn_to_action(uint8_t keycode) 42 matrix_scan_user();
28{
29 return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) };
30} 43}
diff --git a/keyboard/alps64/keymap_common.h b/keyboard/alps64/alps64.h
index 957db5792..d0777201e 100644
--- a/keyboard/alps64/keymap_common.h
+++ b/keyboard/alps64/alps64.h
@@ -14,25 +14,10 @@ GNU General Public License for more details.
14You should have received a copy of the GNU General Public License 14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 16*/
17#ifndef KEYMAP_COMMON_H 17#ifndef ALPS64_H
18#define KEYMAP_COMMON_H 18#define ALPS64_H
19
20#include <stdint.h>
21#include <stdbool.h>
22#include <avr/pgmspace.h>
23#include "keycode.h"
24#include "action.h"
25#include "action_macro.h"
26#include "report.h"
27#include "host.h"
28#include "print.h"
29#include "debug.h"
30#include "keymap.h"
31
32
33extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
34extern const uint16_t fn_actions[];
35 19
20#include "quantum.h"
36 21
37/* Alps64 keymap definition macro */ 22/* Alps64 keymap definition macro */
38#define KEYMAP( \ 23#define KEYMAP( \
diff --git a/keyboard/alps64/config.h b/keyboard/alps64/config.h
index 824d3e830..858a82ecd 100644
--- a/keyboard/alps64/config.h
+++ b/keyboard/alps64/config.h
@@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
18#ifndef CONFIG_H 18#ifndef CONFIG_H
19#define CONFIG_H 19#define CONFIG_H
20 20
21#include "config_common.h"
21 22
22/* USB Device descriptor parameter */ 23/* USB Device descriptor parameter */
23#define VENDOR_ID 0xFEED 24#define VENDOR_ID 0xFEED
@@ -31,6 +32,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
31#define MATRIX_ROWS 8 32#define MATRIX_ROWS 8
32#define MATRIX_COLS 8 33#define MATRIX_COLS 8
33 34
35#define MATRIX_COL_PINS { B0, B1, B2, B3, B4, B5, B6, B7 }
36#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5, D6, C2 }
37#define UNUSED_PINS
38
34/* define if matrix has ghost */ 39/* define if matrix has ghost */
35//#define MATRIX_HAS_GHOST 40//#define MATRIX_HAS_GHOST
36 41
diff --git a/keyboard/alps64/keymaps/default.c b/keyboard/alps64/keymaps/default.c
index a54899196..2c45dc7f3 100644
--- a/keyboard/alps64/keymaps/default.c
+++ b/keyboard/alps64/keymaps/default.c
@@ -1,6 +1,6 @@
1#include "keymap_common.h" 1#include "alps64.h"
2 2
3const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4 /* 0: qwerty */ 4 /* 0: qwerty */
5 KEYMAP( \ 5 KEYMAP( \
6 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS, BSPC, \ 6 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS, BSPC, \
diff --git a/keyboard/alps64/keymaps/hasu.c b/keyboard/alps64/keymaps/hasu.c
index d297d72fe..e93dd0d41 100644
--- a/keyboard/alps64/keymaps/hasu.c
+++ b/keyboard/alps64/keymaps/hasu.c
@@ -1,9 +1,9 @@
1#include "keymap_common.h" 1#include "alps64.h"
2 2
3/* 3/*
4 * Hasu 4 * Hasu
5 */ 5 */
6const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 6const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
7 /* Default Layer 7 /* Default Layer
8 * ,-----------------------------------------------------------. 8 * ,-----------------------------------------------------------.
9 * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ | 9 * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |
diff --git a/keyboard/alps64/matrix.c b/keyboard/alps64/matrix.c
index 5638d7f69..805999d4a 100644
--- a/keyboard/alps64/matrix.c
+++ b/keyboard/alps64/matrix.c
@@ -55,10 +55,6 @@ uint8_t matrix_cols(void)
55 return MATRIX_COLS; 55 return MATRIX_COLS;
56} 56}
57 57
58#define LED_ON() do { DDRC |= (1<<5); PORTC |= (1<<5); } while (0)
59#define LED_OFF() do { DDRC &= ~(1<<5); PORTC &= ~(1<<5); } while (0)
60#define LED_TGL() do { DDRC |= (1<<5); PINC |= (1<<5); } while (0)
61
62void matrix_init(void) 58void matrix_init(void)
63{ 59{
64 // initialize row and col 60 // initialize row and col
@@ -160,6 +156,7 @@ static void unselect_rows(void)
160 PORTC &= ~0b00000100; 156 PORTC &= ~0b00000100;
161} 157}
162 158
159
163static void select_row(uint8_t row) 160static void select_row(uint8_t row)
164{ 161{
165 // Output low(DDR:1, PORT:0) to select 162 // Output low(DDR:1, PORT:0) to select
diff --git a/keyboard/gh60/Makefile b/keyboard/gh60/Makefile
index 4c8f9dc8a..9429049fd 100644
--- a/keyboard/gh60/Makefile
+++ b/keyboard/gh60/Makefile
@@ -42,14 +42,14 @@
42TARGET = gh60_lufa 42TARGET = gh60_lufa
43 43
44# Directory common source filess exist 44# Directory common source filess exist
45TOP_DIR = ../..
45TMK_DIR = ../../tmk_core 46TMK_DIR = ../../tmk_core
46 47
47# Directory keyboard dependent files exist 48# Directory keyboard dependent files exist
48TARGET_DIR = . 49TARGET_DIR = .
49 50
50# project specific files 51# project specific files
51SRC = keymap_common.c \ 52SRC = matrix.c \
52 matrix.c \
53 led.c 53 led.c
54 54
55ifdef KEYMAP 55ifdef KEYMAP
@@ -119,6 +119,7 @@ MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
119EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 119EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
120CONSOLE_ENABLE = yes # Console for debug(+400) 120CONSOLE_ENABLE = yes # Console for debug(+400)
121COMMAND_ENABLE = yes # Commands for debug and configuration 121COMMAND_ENABLE = yes # Commands for debug and configuration
122CUSTOM_MATRIX = yes
122#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend 123#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
123NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA 124NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
124 125
@@ -128,8 +129,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
128 129
129# Search Path 130# Search Path
130VPATH += $(TARGET_DIR) 131VPATH += $(TARGET_DIR)
132VPATH += $(TOP_DIR)
131VPATH += $(TMK_DIR) 133VPATH += $(TMK_DIR)
132 134
133include $(TMK_DIR)/protocol/lufa.mk 135include $(TOP_DIR)/quantum/quantum.mk
134include $(TMK_DIR)/common.mk
135include $(TMK_DIR)/rules.mk \ No newline at end of file
diff --git a/keyboard/gh60/keymap_common.c b/keyboard/gh60/keymap_common.c
deleted file mode 100644
index fdb1769e1..000000000
--- a/keyboard/gh60/keymap_common.c
+++ /dev/null
@@ -1,30 +0,0 @@
1/*
2Copyright 2012,2013 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#include "keymap_common.h"
18
19
20/* translates key to keycode */
21uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
22{
23 return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
24}
25
26/* translates Fn keycode to action */
27action_t keymap_fn_to_action(uint8_t keycode)
28{
29 return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) };
30}
diff --git a/keyboard/hhkb/Makefile b/keyboard/hhkb/Makefile
index 21ba261a2..b6c3b869e 100644
--- a/keyboard/hhkb/Makefile
+++ b/keyboard/hhkb/Makefile
@@ -56,7 +56,7 @@ SRC = hhkb_qmk.c \
56ifdef KEYMAP 56ifdef KEYMAP
57 SRC := keymaps/keymaps/$(KEYMAP).c $(SRC) 57 SRC := keymaps/keymaps/$(KEYMAP).c $(SRC)
58else 58else
59 SRC := keymaps/keymaps/default.c $(SRC) 59 SRC := keymaps/default.c $(SRC)
60endif 60endif
61 61
62CONFIG_H = config.h 62CONFIG_H = config.h
diff --git a/keyboard/hhkb/matrix.c b/keyboard/hhkb/matrix.c
index 14fae0b82..2dfb2f5e1 100644
--- a/keyboard/hhkb/matrix.c
+++ b/keyboard/hhkb/matrix.c
@@ -188,6 +188,14 @@ void matrix_print(void)
188 } 188 }
189} 189}
190 190
191uint8_t matrix_key_count(void) {
192 uint8_t count = 0;
193 for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) {
194 count += bitpop16(matrix_get_row(r));
195 }
196 return count;
197}
198
191void matrix_power_up(void) { 199void matrix_power_up(void) {
192 KEY_POWER_ON(); 200 KEY_POWER_ON();
193} 201}
diff --git a/keyboard/jd45/Makefile b/keyboard/jd45/Makefile
index f6a8d10c5..d270a6f8a 100644
--- a/keyboard/jd45/Makefile
+++ b/keyboard/jd45/Makefile
@@ -56,7 +56,7 @@ SRC = jd45.c \
56ifdef KEYMAP 56ifdef KEYMAP
57 SRC := keymaps/keymaps/(KEYMAP).c $(SRC) 57 SRC := keymaps/keymaps/(KEYMAP).c $(SRC)
58else 58else
59 SRC := keymaps/keymaps/default.c $(SRC) 59 SRC := keymaps/default.c $(SRC)
60endif 60endif
61 61
62CONFIG_H = config.h 62CONFIG_H = config.h
diff --git a/keyboard/kc60_v2/Makefile b/keyboard/kc60_v2/Makefile
new file mode 100644
index 000000000..33ece3164
--- /dev/null
+++ b/keyboard/kc60_v2/Makefile
@@ -0,0 +1,158 @@
1#----------------------------------------------------------------------------
2# On command line:
3#
4# make all = Make software.
5#
6# make clean = Clean out built project files.
7#
8# make coff = Convert ELF to AVR COFF.
9#
10# make extcoff = Convert ELF to AVR Extended COFF.
11#
12# make program = Download the hex file to the device.
13# Please customize your programmer settings(PROGRAM_CMD)
14#
15# make teensy = Download the hex file to the device, using teensy_loader_cli.
16# (must have teensy_loader_cli installed).
17#
18# make dfu = Download the hex file to the device, using dfu-programmer (must
19# have dfu-programmer installed).
20#
21# make flip = Download the hex file to the device, using Atmel FLIP (must
22# have Atmel FLIP installed).
23#
24# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
25# (must have dfu-programmer installed).
26#
27# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
28# (must have Atmel FLIP installed).
29#
30# make debug = Start either simulavr or avarice as specified for debugging,
31# with avr-gdb or avr-insight as the front end for debugging.
32#
33# make filename.s = Just compile filename.c into the assembler code only.
34#
35# make filename.i = Create a preprocessed source file for use in submitting
36# bug reports to the GCC project.
37#
38# To rebuild project do "make clean" then "make all".
39#----------------------------------------------------------------------------
40
41# Target file name (without extension).
42TARGET = kc60
43
44
45# Directory common source filess exist
46TOP_DIR = ../..
47TMK_DIR = ../../tmk_core
48
49# Directory keyboard dependent files exist
50TARGET_DIR = .
51
52# # project specific files
53SRC = kc60.c
54
55ifdef KEYMAP
56 SRC := keymaps/$(KEYMAP).c $(SRC)
57else
58 SRC := keymaps/default.c $(SRC)
59endif
60
61CONFIG_H = config.h
62
63# MCU name
64#MCU = at90usb1287
65MCU = atmega32u4
66
67# Processor frequency.
68# This will define a symbol, F_CPU, in all source code files equal to the
69# processor frequency in Hz. You can then use this symbol in your source code to
70# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
71# automatically to create a 32-bit value in your source code.
72#
73# This will be an integer division of F_USB below, as it is sourced by
74# F_USB after it has run through any CPU prescalers. Note that this value
75# does not *change* the processor frequency - it should merely be updated to
76# reflect the processor speed set externally so that the code can use accurate
77# software delays.
78F_CPU = 16000000
79
80
81#
82# LUFA specific
83#
84# Target architecture (see library "Board Types" documentation).
85ARCH = AVR8
86
87# Input clock frequency.
88# This will define a symbol, F_USB, in all source code files equal to the
89# input clock frequency (before any prescaling is performed) in Hz. This value may
90# differ from F_CPU if prescaling is used on the latter, and is required as the
91# raw input clock is fed directly to the PLL sections of the AVR for high speed
92# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
93# at the end, this will be done automatically to create a 32-bit value in your
94# source code.
95#
96# If no clock division is performed on the input clock inside the AVR (via the
97# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
98F_USB = $(F_CPU)
99
100# Interrupt driven control endpoint task(+60)
101OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
102
103
104# Boot Section Size in *bytes*
105# Teensy halfKay 512
106# Teensy++ halfKay 1024
107# Atmel DFU loader 4096
108# LUFA bootloader 4096
109# USBaspLoader 2048
110OPT_DEFS += -DBOOTLOADER_SIZE=4096
111
112
113# Build Options
114# change yes to no to disable
115#
116BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
117MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
118EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
119CONSOLE_ENABLE = yes # Console for debug(+400)
120COMMAND_ENABLE = yes # Commands for debug and configuration
121KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key
122# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
123SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
124# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
125NKRO_ENABLE = no # USB Nkey Rollover
126BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
127MIDI_ENABLE = no # MIDI controls
128UNICODE_ENABLE = no # Unicode
129BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
130AUDIO_ENABLE = no # Audio output on port C6
131
132
133ifdef KEYMAP
134
135ifeq ("$(wildcard keymaps/$(KEYMAP).c)","")
136ifneq ("$(wildcard keymaps/$(KEYMAP)/makefile.mk)","")
137 include keymaps/$(KEYMAP)/makefile.mk
138endif
139endif
140
141else
142
143ifneq ("$(wildcard keymaps/default/makefile.mk)","")
144 include keymaps/default/makefile.mk
145endif
146
147endif
148
149# Optimize size but this may cause error "relocation truncated to fit"
150#EXTRALDFLAGS = -Wl,--relax
151
152# Search Path
153VPATH += $(TARGET_DIR)
154VPATH += $(TOP_DIR)
155VPATH += $(TMK_DIR)
156
157include $(TOP_DIR)/quantum/quantum.mk
158
diff --git a/keyboard/kc60_v2/README.md b/keyboard/kc60_v2/README.md
new file mode 100644
index 000000000..4be448d15
--- /dev/null
+++ b/keyboard/kc60_v2/README.md
@@ -0,0 +1,24 @@
1kc60 keyboard firmware
2======================
3
4## Quantum MK Firmware
5
6For the full Quantum feature list, see [the parent README.md](/README.md).
7
8## Building
9
10Download or clone the whole firmware and navigate to the keyboard/kc60 folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
11
12Depending on which keymap you would like to use, you will have to compile slightly differently.
13
14### Default
15To build with the default keymap, simply run `make`.
16
17### Other Keymaps
18Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` in the keymaps folder, and see keymap document (you can find in top README.md) and existent keymap files.
19
20To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
21```
22$ make KEYMAP=[default|jack|<name>]
23```
24Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboard/kc60_v2/config.h b/keyboard/kc60_v2/config.h
new file mode 100644
index 000000000..16bc1cbb2
--- /dev/null
+++ b/keyboard/kc60_v2/config.h
@@ -0,0 +1,161 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER You
28#define PRODUCT kc60v2
29#define DESCRIPTION A custom keyboard
30
31/* key matrix size */
32#define MATRIX_ROWS 5
33#define MATRIX_COLS 14
34
35/*
36 * Keyboard Matrix Assignments
37 *
38 * Change this to how you wired your keyboard
39 * COLS: AVR pins used for columns, left to right
40 * ROWS: AVR pins used for rows, top to bottom
41 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
42 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
43 *
44*/
45
46// Possible pins for columns include: F1 F0 E6 D7 D6 D4 C7 C6 B7 B5 B4 B3 B1 B0
47// Pins for rows include: D0 D1 F6 F7 D5
48#define MATRIX_ROW_PINS { D0, D1, F6, F7, D5 }
49#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 }
50#define UNUSED_PINS
51
52/* COL2ROW or ROW2COL */
53#define DIODE_DIRECTION COL2ROW
54
55/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
56#define DEBOUNCING_DELAY 5
57
58/* define if matrix has ghost (lacks anti-ghosting diodes) */
59//#define MATRIX_HAS_GHOST
60
61/* number of backlight levels */
62#define BACKLIGHT_LEVELS 3
63
64/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
65#define LOCKING_SUPPORT_ENABLE
66/* Locking resynchronize hack */
67#define LOCKING_RESYNC_ENABLE
68
69/*
70 * Force NKRO
71 *
72 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
73 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
74 * makefile for this to work.)
75 *
76 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
77 * until the next keyboard reset.
78 *
79 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
80 * fully operational during normal computer usage.
81 *
82 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
83 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
84 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
85 * power-up.
86 *
87 */
88//#define FORCE_NKRO
89
90/*
91 * Magic Key Options
92 *
93 * Magic keys are hotkey commands that allow control over firmware functions of
94 * the keyboard. They are best used in combination with the HID Listen program,
95 * found here: https://www.pjrc.com/teensy/hid_listen.html
96 *
97 * The options below allow the magic key functionality to be changed. This is
98 * useful if your keyboard/keypad is missing keys and you want magic key support.
99 *
100 */
101
102/* key combination for magic key command */
103#define IS_COMMAND() ( \
104 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
105)
106
107/* control how magic key switches layers */
108//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
109//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
110//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
111
112/* override magic key keymap */
113//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
114//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
115//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
116//#define MAGIC_KEY_HELP1 H
117//#define MAGIC_KEY_HELP2 SLASH
118//#define MAGIC_KEY_DEBUG D
119//#define MAGIC_KEY_DEBUG_MATRIX X
120//#define MAGIC_KEY_DEBUG_KBD K
121//#define MAGIC_KEY_DEBUG_MOUSE M
122//#define MAGIC_KEY_VERSION V
123//#define MAGIC_KEY_STATUS S
124//#define MAGIC_KEY_CONSOLE C
125//#define MAGIC_KEY_LAYER0_ALT1 ESC
126//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
127//#define MAGIC_KEY_LAYER0 0
128//#define MAGIC_KEY_LAYER1 1
129//#define MAGIC_KEY_LAYER2 2
130//#define MAGIC_KEY_LAYER3 3
131//#define MAGIC_KEY_LAYER4 4
132//#define MAGIC_KEY_LAYER5 5
133//#define MAGIC_KEY_LAYER6 6
134//#define MAGIC_KEY_LAYER7 7
135//#define MAGIC_KEY_LAYER8 8
136//#define MAGIC_KEY_LAYER9 9
137//#define MAGIC_KEY_BOOTLOADER PAUSE
138//#define MAGIC_KEY_LOCK CAPS
139//#define MAGIC_KEY_EEPROM E
140//#define MAGIC_KEY_NKRO N
141//#define MAGIC_KEY_SLEEP_LED Z
142
143/*
144 * Feature disable options
145 * These options are also useful to firmware size reduction.
146 */
147
148/* disable debug print */
149//#define NO_DEBUG
150
151/* disable print */
152//#define NO_PRINT
153
154/* disable action features */
155//#define NO_ACTION_LAYER
156//#define NO_ACTION_TAPPING
157//#define NO_ACTION_ONESHOT
158//#define NO_ACTION_MACRO
159//#define NO_ACTION_FUNCTION
160
161#endif
diff --git a/keyboard/kc60_v2/kc60.c b/keyboard/kc60_v2/kc60.c
new file mode 100644
index 000000000..0a578b2b8
--- /dev/null
+++ b/keyboard/kc60_v2/kc60.c
@@ -0,0 +1,111 @@
1#include "kc60.h"
2
3__attribute__ ((weak))
4 void matrix_init_user(void) {
5 // leave this function blank - it can be defined in a keymap file
6 };
7
8__attribute__ ((weak))
9 void matrix_scan_user(void) {
10 // leave this function blank - it can be defined in a keymap file
11 }
12
13__attribute__ ((weak))
14 bool process_action_user(keyrecord_t *record) {
15 // leave this function blank - it can be defined in a keymap file
16 return true;
17 }
18
19__attribute__ ((weak))
20 void led_set_user(uint8_t usb_led) {
21 // leave this function blank - it can be defined in a keymap file
22 }
23
24void matrix_init_kb(void) {
25 // put your keyboard start-up code here
26 // runs once when the firmware starts up
27
28#ifdef BACKLIGHT_ENABLE
29 backlight_init_ports();
30#endif
31
32 matrix_init_user();
33}
34
35void matrix_scan_kb(void) {
36 // put your looping keyboard code here
37 // runs every cycle (a lot)
38
39 matrix_scan_user();
40}
41
42bool process_action_kb(keyrecord_t *record) {
43 // put your per-action keyboard code here
44 // runs for every action, just before processing by the firmware
45
46 return process_action_user(record);
47}
48
49void led_set_kb(uint8_t usb_led) {
50 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
51
52 led_set_user(usb_led);
53}
54
55#ifdef BACKLIGHT_ENABLE
56#define CHANNEL OCR1B
57
58void backlight_init_ports()
59{
60
61 // Setup PB6 as output and output low.
62 DDRB |= (1<<6);
63 PORTB &= ~(1<<6);
64
65 // Use full 16-bit resolution.
66 ICR1 = 0xFFFF;
67
68 // I could write a wall of text here to explain... but TL;DW
69 // Go read the ATmega32u4 datasheet.
70 // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
71
72 // Pin PB7 = OCR1C (Timer 1, Channel C)
73 // Compare Output Mode = Clear on compare match, Channel C = COM1B1=1 COM1C0=0
74 // (i.e. start high, go low when counter matches.)
75 // WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0
76 // Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1
77
78 TCCR1A = _BV(COM1B1) | _BV(WGM11); // = 0b00001010;
79 TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
80
81 backlight_init();
82}
83
84void backlight_set(uint8_t level)
85{
86 // Prevent backlight blink on lowest level
87 PORTB &= ~(_BV(PORTB6));
88
89 if ( level == 0 )
90 {
91 // Turn off PWM control on PB6, revert to output low.
92 TCCR1A &= ~(_BV(COM1B1));
93 CHANNEL = 0x0;
94 }
95 else if ( level == BACKLIGHT_LEVELS)
96 {
97 // Turn on PWM control of PB6
98 TCCR1A |= _BV(COM1B1);
99 // Set the brightness
100 CHANNEL = 0xFFFF;
101 }
102 else
103 {
104 // Turn on PWM control of PB6
105 TCCR1A |= _BV(COM1B1);
106 // Set the brightness
107 CHANNEL = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
108 }
109}
110
111#endif
diff --git a/keyboard/kc60_v2/kc60.h b/keyboard/kc60_v2/kc60.h
new file mode 100644
index 000000000..d346a5502
--- /dev/null
+++ b/keyboard/kc60_v2/kc60.h
@@ -0,0 +1,36 @@
1#ifndef KC60_H
2#define KC60_H
3
4#include "matrix.h"
5#include "keymap_common.h"
6#ifdef BACKLIGHT_ENABLE
7#include "backlight.h"
8#endif
9#include <avr/io.h>
10#include <stddef.h>
11
12// This a shortcut to help you visually see your layout.
13// The first section contains all of the arguements
14// The second converts the arguments into a multi-dimensional array
15#define KEYMAP( \
16 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
17 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
18 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
19 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
20 K40, K41, K42, K45, K4A, K4B, K4C, K4D \
21 ) { \
22 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
23 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
24 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
25 { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
26 { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO,K4A, K4B, K4C, K4D } \
27}
28
29void matrix_init_user(void);
30void matrix_scan_user(void);
31bool process_action_user(keyrecord_t *record);
32
33void led_set_user(uint8_t usb_led);
34void backlight_init_ports(void);
35
36#endif
diff --git a/keyboard/kc60_v2/keymaps/default.c b/keyboard/kc60_v2/keymaps/default.c
new file mode 100644
index 000000000..6f8352c69
--- /dev/null
+++ b/keyboard/kc60_v2/keymaps/default.c
@@ -0,0 +1,24 @@
1// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
2// this is the style you want to emulate.
3
4#include "kc60.h"
5
6const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
7 [0] = KEYMAP( /* Basic QWERTY */
8 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
9 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
10 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
11 KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, \
12 KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, RESET \
13 ),
14};
15
16const uint16_t PROGMEM fn_actions[] = {
17
18};
19
20const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
21{
22 // MACRODOWN only works in this function
23 return MACRO_NONE;
24};
diff --git a/keyboard/planck/.gitignore b/keyboard/planck/.gitignore
new file mode 100644
index 000000000..6e92f57d4
--- /dev/null
+++ b/keyboard/planck/.gitignore
@@ -0,0 +1 @@
tags
diff --git a/quantum/keymap_common.h b/quantum/keymap_common.h
index db14e7d8a..c72c0bc29 100644
--- a/quantum/keymap_common.h
+++ b/quantum/keymap_common.h
@@ -88,10 +88,8 @@ extern const uint16_t fn_actions[];
88 88
89#define KC_AT LSFT(KC_2) // @ 89#define KC_AT LSFT(KC_2) // @
90 90
91
92#define KC_HASH LSFT(KC_3) // # 91#define KC_HASH LSFT(KC_3) // #
93 92
94
95#define KC_DLR LSFT(KC_4) // $ 93#define KC_DLR LSFT(KC_4) // $
96#define KC_DOLLAR KC_DLR 94#define KC_DOLLAR KC_DLR
97 95
@@ -113,15 +111,11 @@ extern const uint16_t fn_actions[];
113#define KC_RPRN LSFT(KC_0) // ) 111#define KC_RPRN LSFT(KC_0) // )
114#define KC_RIGHT_PAREN KC_RPRN 112#define KC_RIGHT_PAREN KC_RPRN
115 113
116
117#define KC_UNDS LSFT(KC_MINS) // _ 114#define KC_UNDS LSFT(KC_MINS) // _
118#define KC_UNDERSCORE KC_UNDS 115#define KC_UNDERSCORE KC_UNDS
119 116
120#define KC_PLUS LSFT(KC_EQL) // + 117#define KC_PLUS LSFT(KC_EQL) // +
121 118
122#define KC_DQUO LSFT(KC_QUOT) // "
123#define KC_DOUBLE_QUOTE KC_DQUO
124
125#define KC_LCBR LSFT(KC_LBRC) // { 119#define KC_LCBR LSFT(KC_LBRC) // {
126#define KC_LEFT_CURLY_BRACE KC_LCBR 120#define KC_LEFT_CURLY_BRACE KC_LCBR
127 121
@@ -141,16 +135,14 @@ extern const uint16_t fn_actions[];
141 135
142#define KC_LT LSFT(KC_COMM) // < 136#define KC_LT LSFT(KC_COMM) // <
143 137
144
145#define KC_GT LSFT(KC_DOT) // > 138#define KC_GT LSFT(KC_DOT) // >
146 139
147
148#define KC_QUES LSFT(KC_SLSH) // ? 140#define KC_QUES LSFT(KC_SLSH) // ?
149#define KC_QUESTION KC_QUES 141#define KC_QUESTION KC_QUES
150 142
151
152#define KC_DQT LSFT(KC_QUOT) // " 143#define KC_DQT LSFT(KC_QUOT) // "
153#define KC_DOUBLE_QUOTE KC_DQT 144#define KC_DOUBLE_QUOTE KC_DQT
145#define KC_DQUO KC_DQT
154 146
155#define KC_DELT KC_DELETE // Del key (four letter code) 147#define KC_DELT KC_DELETE // Del key (four letter code)
156 148
diff --git a/quantum/matrix.c b/quantum/matrix.c
index d5fd7def8..412662a79 100644
--- a/quantum/matrix.c
+++ b/quantum/matrix.c
@@ -68,8 +68,10 @@ uint8_t matrix_cols(void) {
68 68
69void matrix_init(void) { 69void matrix_init(void) {
70 /* frees PORTF by setting the JTD bit twice within four cycles */ 70 /* frees PORTF by setting the JTD bit twice within four cycles */
71 MCUCR |= _BV(JTD); 71 #ifdef __AVR_ATmega32U4__
72 MCUCR |= _BV(JTD); 72 MCUCR |= _BV(JTD);
73 MCUCR |= _BV(JTD);
74 #endif
73 /* initializes the I/O pins */ 75 /* initializes the I/O pins */
74#if DIODE_DIRECTION == COL2ROW 76#if DIODE_DIRECTION == COL2ROW
75 for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { 77 for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) {
diff --git a/quantum/quantum.c b/quantum/quantum.c
index c53fb19b4..d9aaafd61 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -13,6 +13,16 @@ bool process_action_kb(keyrecord_t *record) {
13} 13}
14 14
15__attribute__ ((weak)) 15__attribute__ ((weak))
16bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
17 return process_record_user(keycode, record);
18}
19
20__attribute__ ((weak))
21bool process_record_user(uint16_t keycode, keyrecord_t *record) {
22 return true;
23}
24
25__attribute__ ((weak))
16void leader_start(void) {} 26void leader_start(void) {}
17 27
18__attribute__ ((weak)) 28__attribute__ ((weak))
@@ -124,6 +134,9 @@ bool process_record_quantum(keyrecord_t *record) {
124 keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key); 134 keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key);
125 #endif 135 #endif
126 136
137 if (!process_record_kb(keycode, record))
138 return false;
139
127 // This is how you use actions here 140 // This is how you use actions here
128 // if (keycode == KC_LEAD) { 141 // if (keycode == KC_LEAD) {
129 // action_t action; 142 // action_t action;
diff --git a/quantum/quantum.h b/quantum/quantum.h
index 69a0d8126..3ce940895 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -23,6 +23,7 @@
23#include "eeconfig.h" 23#include "eeconfig.h"
24#include <stddef.h> 24#include <stddef.h>
25#include <avr/io.h> 25#include <avr/io.h>
26#include <util/delay.h>
26 27
27extern uint32_t default_layer_state; 28extern uint32_t default_layer_state;
28 29
@@ -61,6 +62,9 @@ extern uint32_t default_layer_state;
61void matrix_init_kb(void); 62void matrix_init_kb(void);
62void matrix_scan_kb(void); 63void matrix_scan_kb(void);
63bool process_action_kb(keyrecord_t *record); 64bool process_action_kb(keyrecord_t *record);
65bool process_record_kb(uint16_t keycode, keyrecord_t *record);
66bool process_record_user(uint16_t keycode, keyrecord_t *record);
67
64 68
65bool is_music_on(void); 69bool is_music_on(void);
66void music_toggle(void); 70void music_toggle(void);
diff --git a/quantum/quantum.mk b/quantum/quantum.mk
index c099d6793..00d3e8114 100644
--- a/quantum/quantum.mk
+++ b/quantum/quantum.mk
@@ -1,5 +1,9 @@
1QUANTUM_DIR = quantum 1QUANTUM_DIR = quantum
2 2
3ifndef VERBOSE
4.SILENT:
5endif
6
3# # project specific files 7# # project specific files
4SRC += $(QUANTUM_DIR)/quantum.c \ 8SRC += $(QUANTUM_DIR)/quantum.c \
5 $(QUANTUM_DIR)/keymap_common.c \ 9 $(QUANTUM_DIR)/keymap_common.c \
diff --git a/quantum/template/Makefile b/quantum/template/Makefile
index 1a535ef2c..f101eb7a6 100644
--- a/quantum/template/Makefile
+++ b/quantum/template/Makefile
@@ -123,7 +123,7 @@ KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key
123SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 123SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
124# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 124# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
125NKRO_ENABLE = no # USB Nkey Rollover 125NKRO_ENABLE = no # USB Nkey Rollover
126BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality 126BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
127MIDI_ENABLE = no # MIDI controls 127MIDI_ENABLE = no # MIDI controls
128UNICODE_ENABLE = no # Unicode 128UNICODE_ENABLE = no # Unicode
129BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID 129BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index 1d384574f..37be850f8 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -393,12 +393,10 @@ lib: $(LIBNAME)
393# AVR Studio 3.x does not check make's exit code but relies on 393# AVR Studio 3.x does not check make's exit code but relies on
394# the following magic strings to be generated by the compile job. 394# the following magic strings to be generated by the compile job.
395begin: 395begin:
396 @echo
397 @echo $(MSG_BEGIN) 396 @echo $(MSG_BEGIN)
398 397
399end: 398end:
400 @echo $(MSG_END) 399 @echo $(MSG_END)
401 @echo
402 400
403 401
404# Display size of file. 402# Display size of file.
@@ -505,13 +503,11 @@ COFFCONVERT += --change-section-address .eeprom-0x810000
505 503
506 504
507coff: $(TARGET).elf 505coff: $(TARGET).elf
508 @echo
509 @echo $(MSG_COFF) $(TARGET).cof 506 @echo $(MSG_COFF) $(TARGET).cof
510 $(COFFCONVERT) -O coff-avr $< $(TARGET).cof 507 $(COFFCONVERT) -O coff-avr $< $(TARGET).cof
511 508
512 509
513extcoff: $(TARGET).elf 510extcoff: $(TARGET).elf
514 @echo
515 @echo $(MSG_EXTENDED_COFF) $(TARGET).cof 511 @echo $(MSG_EXTENDED_COFF) $(TARGET).cof
516 $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof 512 $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
517 513
@@ -519,25 +515,21 @@ extcoff: $(TARGET).elf
519 515
520# Create final output files (.hex, .eep) from ELF output file. 516# Create final output files (.hex, .eep) from ELF output file.
521%.hex: %.elf 517%.hex: %.elf
522 @echo
523 @echo $(MSG_FLASH) $@ 518 @echo $(MSG_FLASH) $@
524 $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@ 519 $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@
525 520
526%.eep: %.elf 521%.eep: %.elf
527 @echo
528 @echo $(MSG_EEPROM) $@ 522 @echo $(MSG_EEPROM) $@
529 -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ 523 -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
530 --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0 524 --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0
531 525
532# Create extended listing file from ELF output file. 526# Create extended listing file from ELF output file.
533%.lss: %.elf 527%.lss: %.elf
534 @echo
535 @echo $(MSG_EXTENDED_LISTING) $@ 528 @echo $(MSG_EXTENDED_LISTING) $@
536 $(OBJDUMP) -h -S -z $< > $@ 529 $(OBJDUMP) -h -S -z $< > $@
537 530
538# Create a symbol table from ELF output file. 531# Create a symbol table from ELF output file.
539%.sym: %.elf 532%.sym: %.elf
540 @echo
541 @echo $(MSG_SYMBOL_TABLE) $@ 533 @echo $(MSG_SYMBOL_TABLE) $@
542 $(NM) -n $< > $@ 534 $(NM) -n $< > $@
543 535
@@ -547,7 +539,6 @@ extcoff: $(TARGET).elf
547.SECONDARY : $(TARGET).a 539.SECONDARY : $(TARGET).a
548.PRECIOUS : $(OBJ) 540.PRECIOUS : $(OBJ)
549%.a: $(OBJ) 541%.a: $(OBJ)
550 @echo
551 @echo $(MSG_CREATING_LIBRARY) $@ 542 @echo $(MSG_CREATING_LIBRARY) $@
552 $(AR) $@ $(OBJ) 543 $(AR) $@ $(OBJ)
553 544
@@ -556,14 +547,12 @@ extcoff: $(TARGET).elf
556.SECONDARY : $(TARGET).elf 547.SECONDARY : $(TARGET).elf
557.PRECIOUS : $(OBJ) 548.PRECIOUS : $(OBJ)
558%.elf: $(OBJ) 549%.elf: $(OBJ)
559 @echo
560 @echo $(MSG_LINKING) $@ 550 @echo $(MSG_LINKING) $@
561 $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS) 551 $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)
562 552
563 553
564# Compile: create object files from C source files. 554# Compile: create object files from C source files.
565$(OBJDIR)/%.o : %.c 555$(OBJDIR)/%.o : %.c
566 @echo
567 mkdir -p $(@D) 556 mkdir -p $(@D)
568 @echo $(MSG_COMPILING) $< 557 @echo $(MSG_COMPILING) $<
569 $(CC) -c $(ALL_CFLAGS) $< -o $@ 558 $(CC) -c $(ALL_CFLAGS) $< -o $@
@@ -571,7 +560,6 @@ $(OBJDIR)/%.o : %.c
571 560
572# Compile: create object files from C++ source files. 561# Compile: create object files from C++ source files.
573$(OBJDIR)/%.o : %.cpp 562$(OBJDIR)/%.o : %.cpp
574 @echo
575 mkdir -p $(@D) 563 mkdir -p $(@D)
576 @echo $(MSG_COMPILING_CPP) $< 564 @echo $(MSG_COMPILING_CPP) $<
577 $(CC) -c $(ALL_CPPFLAGS) $< -o $@ 565 $(CC) -c $(ALL_CPPFLAGS) $< -o $@
@@ -589,7 +577,6 @@ $(OBJDIR)/%.o : %.cpp
589 577
590# Assemble: create object files from assembler source files. 578# Assemble: create object files from assembler source files.
591$(OBJDIR)/%.o : %.S 579$(OBJDIR)/%.o : %.S
592 @echo
593 mkdir -p $(@D) 580 mkdir -p $(@D)
594 @echo $(MSG_ASSEMBLING) $< 581 @echo $(MSG_ASSEMBLING) $<
595 $(CC) -c $(ALL_ASFLAGS) $< -o $@ 582 $(CC) -c $(ALL_ASFLAGS) $< -o $@
@@ -604,7 +591,6 @@ $(OBJDIR)/%.o : %.S
604clean: begin clean_list end 591clean: begin clean_list end
605 592
606clean_list : 593clean_list :
607 @echo
608 $(REMOVE) $(TARGET).hex 594 $(REMOVE) $(TARGET).hex
609 $(REMOVE) $(TARGET).eep 595 $(REMOVE) $(TARGET).eep
610 $(REMOVE) $(TARGET).cof 596 $(REMOVE) $(TARGET).cof