]> git.gir.st - tmk_keyboard.git/blob - keyboard/hhkb/Makefile.rn42
aae99ee9a426323ab5485525fdc6b41c8193a70d
[tmk_keyboard.git] / keyboard / hhkb / Makefile.rn42
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).
42 TARGET = hhkb_rn42
43
44 # Directory common source filess exist
45 TMK_DIR = ../../tmk_core
46
47 # Directory keyboard dependent files exist
48 TARGET_DIR = .
49
50
51 # List C source files here. (C dependencies are automatically generated.)
52 SRC += matrix.c \
53 led.c
54
55 CONFIG_H = config_rn42.h
56
57
58 # MCU name
59 MCU = atmega32u4
60
61 # Processor frequency.
62 # This will define a symbol, F_CPU, in all source code files equal to the
63 # processor frequency in Hz. You can then use this symbol in your source code to
64 # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
65 # automatically to create a 32-bit value in your source code.
66 #
67 # This will be an integer division of F_USB below, as it is sourced by
68 # F_USB after it has run through any CPU prescalers. Note that this value
69 # does not *change* the processor frequency - it should merely be updated to
70 # reflect the processor speed set externally so that the code can use accurate
71 # software delays.
72 F_CPU = 16000000
73
74
75 #
76 # LUFA specific
77 #
78 # Target architecture (see library "Board Types" documentation).
79 ARCH = AVR8
80
81 # Input clock frequency.
82 # This will define a symbol, F_USB, in all source code files equal to the
83 # input clock frequency (before any prescaling is performed) in Hz. This value may
84 # differ from F_CPU if prescaling is used on the latter, and is required as the
85 # raw input clock is fed directly to the PLL sections of the AVR for high speed
86 # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
87 # at the end, this will be done automatically to create a 32-bit value in your
88 # source code.
89 #
90 # If no clock division is performed on the input clock inside the AVR (via the
91 # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
92 F_USB = $(F_CPU)
93
94 # Interrupt driven control endpoint task
95 #OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
96
97
98 # Boot Section Size in *bytes*
99 # Teensy halfKay 512
100 # Teensy++ halfKay 1024
101 # Atmel DFU loader 4096 (TMK Alt Controller)
102 # LUFA bootloader 4096
103 # USBaspLoader 2048
104 OPT_DEFS += -DBOOTLOADER_SIZE=4096
105
106
107 # Build Options
108 # comment out to disable the options.
109 #
110 BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
111 MOUSEKEY_ENABLE = yes # Mouse keys
112 EXTRAKEY_ENABLE = yes # Audio control and System control
113 CONSOLE_ENABLE = yes # Console for debug
114 COMMAND_ENABLE = yes # Commands for debug and configuration
115 NKRO_ENABLE = yes # USB Nkey Rollover
116 #KEYMAP_SECTION_ENABLE = yes # fixed address keymap for keymap editor
117 #HHKB_JP = yes # HHKB JP support
118
119
120 #
121 # Keymap file
122 #
123 ifdef KEYMAP
124 SRC := keymap_$(KEYMAP).c $(SRC)
125 else
126 ifdef HHKB_JP
127 SRC := keymap_jp.c $(SRC)
128 else
129 SRC := keymap_hhkb.c $(SRC)
130 endif
131 endif
132
133
134 ifneq (, $(or $(findstring keymap_jp.c, $(SRC)), $(findstring yes, $(HHKB_JP))))
135 OPT_DEFS += -DHHKB_JP
136 endif
137
138
139 # Search Path
140 VPATH += $(TARGET_DIR)
141 VPATH += $(TMK_DIR)
142
143 include rn42.mk
144 include $(TMK_DIR)/protocol.mk
145 include $(TMK_DIR)/protocol/lufa.mk
146 include $(TMK_DIR)/common.mk
147 include $(TMK_DIR)/rules.mk
148
149 debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION
150 debug-on: all
151
152 debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT
153 debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS))
154 debug-off: all
Imprint / Impressum