rules.mk 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. ifdef TEENSY2
  2. OPT_DEFS += -DATREUS_TEENSY2
  3. ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
  4. else
  5. OPT_DEFS += -DATREUS_ASTAR
  6. ATREUS_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. # Bootloader
  42. # This definition is optional, and if your keyboard supports multiple bootloaders of
  43. # different sizes, comment this out, and the correct address will be loaded
  44. # automatically (+60). See bootloader.mk for all options.
  45. ifdef TEENSY2
  46. BOOTLOADER = halfkay
  47. else
  48. BOOTLOADER = caterina
  49. endif
  50. # Interrupt driven control endpoint task(+60)
  51. OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
  52. # Build Options
  53. # comment out to disable the options.
  54. #
  55. #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
  56. MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
  57. EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
  58. CONSOLE_ENABLE = yes # Console for debug(+400)
  59. COMMAND_ENABLE = yes # Commands for debug and configuration
  60. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
  61. # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
  62. NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
  63. # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
  64. # MIDI_ENABLE = YES # MIDI controls
  65. UNICODE_ENABLE = YES # Unicode
  66. # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
  67. USB = /dev/cu.usbmodem1411