rules.mk 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. ifdef PCBDOWN
  7. OPT_DEFS += -DPCBDOWN
  8. endif
  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. # MCU name
  13. #MCU = at90usb1287
  14. MCU = atmega32u4
  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. # LUFA specific
  29. #
  30. # Target architecture (see library "Board Types" documentation).
  31. ARCH = AVR8
  32. # Input clock frequency.
  33. # This will define a symbol, F_USB, in all source code files equal to the
  34. # input clock frequency (before any prescaling is performed) in Hz. This value may
  35. # differ from F_CPU if prescaling is used on the latter, and is required as the
  36. # raw input clock is fed directly to the PLL sections of the AVR for high speed
  37. # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
  38. # at the end, this will be done automatically to create a 32-bit value in your
  39. # source code.
  40. #
  41. # If no clock division is performed on the input clock inside the AVR (via the
  42. # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
  43. F_USB = $(F_CPU)
  44. # Bootloader
  45. # This definition is optional, and if your keyboard supports multiple bootloaders of
  46. # different sizes, comment this out, and the correct address will be loaded
  47. # automatically (+60). See bootloader.mk for all options.
  48. ifdef TEENSY2
  49. BOOTLOADER = halfkay
  50. else
  51. BOOTLOADER = caterina
  52. endif
  53. # Interrupt driven control endpoint task(+60)
  54. OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
  55. # Build Options
  56. # comment out to disable the options.
  57. #
  58. #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
  59. MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
  60. EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
  61. CONSOLE_ENABLE = yes # Console for debug(+400)
  62. COMMAND_ENABLE = yes # Commands for debug and configuration
  63. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
  64. # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
  65. NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
  66. # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
  67. # MIDI_ENABLE = YES # MIDI controls
  68. UNICODE_ENABLE = YES # Unicode
  69. # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
  70. USB = /dev/cu.usbmodem1411