]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/teensy_lc_onekey/Makefile.3.0
Add ChibiOS support for QMK (#465)
[qmk_firmware.git] / keyboards / teensy_lc_onekey / Makefile.3.0
1 # Target file name (without extension).
2 PROJECT = ch
3
4 # Directory common source files exist
5 TMK_DIR = ../../tmk_core
6
7 # Directory keyboard dependent files exist
8 TARGET_DIR = .
9
10 # project specific files
11 SRC =   matrix.c \
12             led.c
13
14 ifdef KEYMAP
15     SRC := keymap_$(KEYMAP).c $(SRC)
16 else
17     SRC := keymap_plain.c $(SRC)
18 endif
19
20 CONFIG_H = config.h
21
22 ## chip/board settings
23 # - the next two should match the directories in
24 #   <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
25 # - For Teensies, FAMILY = KINETIS and SERIES is either
26 #   KL2x (LC) or K20x (3.0,3.1,3.2).
27 MCU_FAMILY = KINETIS
28 MCU_SERIES = K20x
29
30 # Linker script to use
31 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
32 #   or <this_dir>/ld/
33 # - NOTE: a custom ld script is needed for EEPROM on Teensy LC
34 # - LDSCRIPT =
35 #   - MKL26Z64 for Teensy LC
36 #   - MK20DX128 for Teensy 3.0
37 #   - MK20DX256 for Teensy 3.1 and 3.2
38 MCU_LDSCRIPT = MK20DX128
39
40 # Startup code to use
41 #  - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
42 # - STARTUP =
43 #   - kl2x for Teensy LC
44 #   - k20x5 for Teensy 3.0
45 #   - k20x7 for Teensy 3.1 and 3.2
46 MCU_STARTUP = k20x5
47
48 # Board: it should exist either in <chibios>/os/hal/boards/
49 #  or <this_dir>/boards
50 # - BOARD =
51 #   - PJRC_TEENSY_LC for Teensy LC
52 #   - PJRC_TEENSY_3 for Teensy 3.0
53 #   - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
54 BOARD = PJRC_TEENSY_3
55
56 # Cortex version
57 # Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
58 MCU  = cortex-m4
59
60 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
61 # I.e. 6 for Teensy LC; 7 for Teensy 3.x
62 ARMV = 7
63
64 # Build Options
65 #   comment out to disable the options.
66 #
67 BOOTMAGIC_ENABLE = yes  # Virtual DIP switch configuration
68 ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
69 MOUSEKEY_ENABLE = yes   # Mouse keys
70 EXTRAKEY_ENABLE = yes   # Audio control and System control
71 CONSOLE_ENABLE = yes    # Console for debug
72 COMMAND_ENABLE = yes    # Commands for debug and configuration
73 SLEEP_LED_ENABLE = yes  # Breathing sleep LED during USB suspend
74 NKRO_ENABLE = yes           # USB Nkey Rollover
75
76 include $(TMK_DIR)/tool/chibios/common.mk
77 include $(TMK_DIR)/tool/chibios/chibios.mk