Makefile 3.0 KB

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