]> git.donarmstrong.com Git - qmk_firmware.git/blob - tmk_core/protocol/usb_hid/test/Makefile
Merge pull request #1235 from siroken3/siroken3
[qmk_firmware.git] / tmk_core / protocol / usb_hid / test / Makefile
1
2
3 # Target file name (without extension).
4 TARGET = usb_hid_test
5
6 TMK_DIR = ../../..
7
8 # Directory keyboard dependent files exist
9 TARGET_DIR = .
10
11 # MCU name
12 MCU = atmega32u4
13
14
15 # Processor frequency.
16 #     This will define a symbol, F_CPU, in all source code files equal to the
17 #     processor frequency in Hz. You can then use this symbol in your source code to
18 #     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
19 #     automatically to create a 32-bit value in your source code.
20 #
21 #     This will be an integer division of F_USB below, as it is sourced by
22 #     F_USB after it has run through any CPU prescalers. Note that this value
23 #     does not *change* the processor frequency - it should merely be updated to
24 #     reflect the processor speed set externally so that the code can use accurate
25 #     software delays.
26 F_CPU = 16000000
27
28
29
30 #
31 # LUFA specific
32 #
33 # Target architecture (see library "Board Types" documentation).
34 ARCH = AVR8
35 # Input clock frequency.
36 #     This will define a symbol, F_USB, in all source code files equal to the
37 #     input clock frequency (before any prescaling is performed) in Hz. This value may
38 #     differ from F_CPU if prescaling is used on the latter, and is required as the
39 #     raw input clock is fed directly to the PLL sections of the AVR for high speed
40 #     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
41 #     at the end, this will be done automatically to create a 32-bit value in your
42 #     source code.
43 #
44 #     If no clock division is performed on the input clock inside the AVR (via the
45 #     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
46 F_USB = $(F_CPU)
47 # Interrupt driven control endpoint task
48 OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
49
50
51
52 # Build Options
53 #   comment out to disable the options.
54 #
55 # Console for debug
56 OPT_DEFS += -DCONSOLE_ENABLE
57
58 # Boot Section Size in bytes
59 #   Teensy halfKay   512
60 #   Atmel DFU loader 4096
61 #   LUFA bootloader  4096
62 #OPT_DEFS += -DBOOT_SIZE=4096
63
64
65
66 SRC =  test.cpp
67 SRC += common/debug.c
68 SRC += common/print.c
69
70 CONFIG_H = config.h
71
72
73
74 # Search Path
75 VPATH += $(TARGET_DIR)
76 VPATH += $(TMK_DIR)
77 VPATH += $(TMK_DIR)/common
78
79
80
81 # program Leonardo
82 PROGRAM_CMD = avrdude -p$(MCU) -cavr109 -P$(DEV) -b57600 -Uflash:w:$(TARGET).hex
83
84
85
86 include $(TMK_DIR)/protocol/usb_hid.mk
87 include $(TMK_DIR)/protocol/lufa.mk
88 include $(TMK_DIR)/rules.mk