]> git.gir.st - tmk_keyboard.git/blob - keyboard/infinity_chibios/Makefile
Merge branch 'master' into chibios
[tmk_keyboard.git] / keyboard / infinity_chibios / Makefile
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 keymap_common.c \
13 led.c
14
15 ifdef KEYMAP
16 SRC := keymap_$(KEYMAP).c $(SRC)
17 else
18 SRC := keymap_plain.c $(SRC)
19 endif
20
21 CONFIG_H = config.h
22
23 ## chip/board settings
24 # - the next two should match the directories in
25 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
26 # - For Teensies, FAMILY = KINETIS and SERIES is either
27 # KL2x (LC) or K20x (3.0,3.1,3.2).
28 MCU_FAMILY = KINETIS
29 MCU_SERIES = K20x
30
31 # Linker script to use
32 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
33 # or <this_dir>/ld/
34 # - NOTE: a custom ld script is needed for EEPROM on Teensy LC
35 # - LDSCRIPT =
36 # - MKL26Z64 for Teensy LC
37 # - MK20DX128 for Teensy 3.0
38 # - MK20DX256 for Teensy 3.1 and 3.2
39 #MCU_LDSCRIPT = MK20DX128
40 MCU_LDSCRIPT = MK20DX128BLDR4
41
42 # Startup code to use
43 # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
44 # - STARTUP =
45 # - kl2x for Teensy LC
46 # - k20x5 for Teensy 3.0
47 # - k20x7 for Teensy 3.1 and 3.2
48 MCU_STARTUP = k20x5
49
50 # Board: it should exist either in <chibios>/os/hal/boards/
51 # or <this_dir>/boards
52 # - BOARD =
53 # - PJRC_TEENSY_LC for Teensy LC
54 # - PJRC_TEENSY_3 for Teensy 3.0
55 # - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
56 BOARD = MCHCK_K20
57
58 # Cortex version
59 # Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
60 MCU = cortex-m4
61
62 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
63 # I.e. 6 for Teensy LC; 7 for Teensy 3.x
64 ARMV = 7
65
66 # Vector table for application
67 # 0x00000000-0x00001000 area is occupied by bootlaoder.*/
68 OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000
69
70
71 # Build Options
72 # comment out to disable the options.
73 #
74 BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
75 ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
76 MOUSEKEY_ENABLE = yes # Mouse keys
77 EXTRAKEY_ENABLE = yes # Audio control and System control
78 CONSOLE_ENABLE = yes # Console for debug
79 COMMAND_ENABLE = yes # Commands for debug and configuration
80 SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
81 NKRO_ENABLE = yes # USB Nkey Rollover
82
83 include $(TMK_DIR)/tool/chibios/common.mk
84 include $(TMK_DIR)/tool/chibios/chibios.mk
85
86 program: $(BUILDDIR)/$(PROJECT).bin
87 dfu-util -D $(BUILDDIR)/$(PROJECT).bin
Imprint / Impressum