]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/atreus/rules.mk
0a254d0e796248e5d92930e9892ae4bea06bf104
[qmk_firmware.git] / keyboards / atreus / rules.mk
1
2
3 ifdef TEENSY2
4     OPT_DEFS += -DATREUS_TEENSY2
5     ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
6 else
7     OPT_DEFS += -DATREUS_ASTAR
8     OPT_DEFS += -DCATERINA_BOOTLOADER
9     ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
10                             avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
11 endif
12
13 # MCU name
14 #MCU = at90usb1287
15 MCU = atmega32u4
16
17 # Processor frequency.
18 #     This will define a symbol, F_CPU, in all source code files equal to the
19 #     processor frequency in Hz. You can then use this symbol in your source code to
20 #     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
21 #     automatically to create a 32-bit value in your source code.
22 #
23 #     This will be an integer division of F_USB below, as it is sourced by
24 #     F_USB after it has run through any CPU prescalers. Note that this value
25 #     does not *change* the processor frequency - it should merely be updated to
26 #     reflect the processor speed set externally so that the code can use accurate
27 #     software delays.
28 F_CPU = 16000000
29
30
31 #
32 # LUFA specific
33 #
34 # Target architecture (see library "Board Types" documentation).
35 ARCH = AVR8
36
37 # Input clock frequency.
38 #     This will define a symbol, F_USB, in all source code files equal to the
39 #     input clock frequency (before any prescaling is performed) in Hz. This value may
40 #     differ from F_CPU if prescaling is used on the latter, and is required as the
41 #     raw input clock is fed directly to the PLL sections of the AVR for high speed
42 #     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
43 #     at the end, this will be done automatically to create a 32-bit value in your
44 #     source code.
45 #
46 #     If no clock division is performed on the input clock inside the AVR (via the
47 #     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
48 F_USB = $(F_CPU)
49
50 # Interrupt driven control endpoint task(+60)
51 OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
52
53
54 # Boot Section Size in *bytes*
55 #   Teensy halfKay   512
56 #   Teensy++ halfKay 1024
57 #   Atmel DFU loader 4096
58 #   LUFA bootloader  4096
59 #   USBaspLoader     2048
60 OPT_DEFS += -DBOOTLOADER_SIZE=4096
61
62
63 # Build Options
64 #   comment out to disable the options.
65 #
66 #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
67 MOUSEKEY_ENABLE = yes   # Mouse keys(+4700)
68 EXTRAKEY_ENABLE = yes   # Audio control and System control(+450)
69 CONSOLE_ENABLE = yes    # Console for debug(+400)
70 COMMAND_ENABLE = yes    # Commands for debug and configuration
71 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
72 # SLEEP_LED_ENABLE = yes  # Breathing sleep LED during USB suspend
73 NKRO_ENABLE = yes               # USB Nkey Rollover - not yet supported in LUFA
74 # BACKLIGHT_ENABLE = yes  # Enable keyboard backlight functionality
75 # MIDI_ENABLE = YES             # MIDI controls
76 UNICODE_ENABLE = YES            # Unicode
77 # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
78
79 USB = /dev/cu.usbmodem1411