Last active
August 29, 2015 14:17
-
-
Save tjweir/236ab2695b95f7c363b7 to your computer and use it in GitHub Desktop.
Octagon: TMK Firmware compilation and dfu programming.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OS X - 10.10.2 | |
# if you're on windows, I can't help with the firmware compilation, but dfu-programming is the same. | |
# Set crosspack avr-gcc | |
> export PATH=/usr/local/CrossPack-AVR/bin:$PATH | |
# avr-gcc version | |
> avr-gcc --version | |
avr-gcc (GCC) 4.8.1 | |
Copyright (C) 2013 Free Software Foundation, Inc. | |
# dfu-programmer version | |
> dfu-programmer --version | |
dfu-programmer 0.5.4 | |
# go to keyboard/octagon | |
> pwd | |
/Users/tjweir/g/2015/tmk_octagon/keyboard/octagon | |
# clean and make | |
> make clean && make | |
... | |
Creating load file for Flash: octagon_lufa.hex | |
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature octagon_lufa.elf octagon_lufa.hex | |
... | |
-------- end -------- | |
# connect your octagon with the FLIP key pressed. The FLIP key is above backspace on the right. | |
# erase the current firmware | |
> dfu-programmer atmega32u4 erase | |
# flash the new firmware | |
> dfu-programmer atmega32u4 flash octagon_lufa.hex | |
# unplug and replug your octagon without the FLIP key pressed. | |
# type and be awesome. | |
# my layout - ignore layer 2, just messing about. | |
static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |
KEYMAP(\ | |
ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PGUP,PAUS, \ | |
GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC,DEL, \ | |
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS,HOME, \ | |
LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,PGDN,ENT, PGUP, \ | |
LSFT, Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,UP, PGDN, \ | |
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] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_ALPHA), | |
[3] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_MODNUM), | |
[4] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_EXTRA), | |
[5] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_FROW), | |
[6] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_RGBRED), | |
[7] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_RGBGREEN), | |
[8] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_RGBBLUE), | |
[9] = ACTION_LAYER_MOMENTARY(2) | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment