rules.mk 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # MCU name
  2. MCU = atmega16u2
  3. # Processor frequency.
  4. # This will define a symbol, F_CPU, in all source code files equal to the
  5. # processor frequency in Hz. You can then use this symbol in your source code to
  6. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  7. # automatically to create a 32-bit value in your source code.
  8. #
  9. # This will be an integer division of F_USB below, as it is sourced by
  10. # F_USB after it has run through any CPU prescalers. Note that this value
  11. # does not *change* the processor frequency - it should merely be updated to
  12. # reflect the processor speed set externally so that the code can use accurate
  13. # software delays.
  14. F_CPU = 16000000
  15. # LUFA specific
  16. # Target architecture (see library "Board Types" documentation).
  17. ARCH = AVR8
  18. # Input clock frequency.
  19. # This will define a symbol, F_USB, in all source code files equal to the
  20. # input clock frequency (before any prescaling is performed) in Hz. This value may
  21. # differ from F_CPU if prescaling is used on the latter, and is required as the
  22. # raw input clock is fed directly to the PLL sections of the AVR for high speed
  23. # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
  24. # at the end, this will be done automatically to create a 32-bit value in your
  25. # source code.
  26. #
  27. # If no clock division is performed on the input clock inside the AVR (via the
  28. # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
  29. F_USB = $(F_CPU)
  30. # Interrupt driven control endpoint task(+60)
  31. OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
  32. # Boot Section Size in *bytes*
  33. # Teensy halfKay 512
  34. # Teensy++ halfKay 2048
  35. # Atmel DFU loader 4096
  36. # LUFA bootloader 4096
  37. # USBaspLoader 2048
  38. OPT_DEFS += -DBOOTLOADER_SIZE=4096
  39. BOOTLOADER = atmel-dfu
  40. # Build Options
  41. BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
  42. MOUSEKEY_ENABLE = no # Mouse keys(+4700)
  43. EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
  44. CONSOLE_ENABLE = no # Console for debug(+400)
  45. COMMAND_ENABLE = no # Commands for debug and configuration
  46. NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
  47. BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
  48. MIDI_ENABLE = no # MIDI controls
  49. AUDIO_ENABLE = no # Audio output on port C6
  50. UNICODE_ENABLE = no # Unicode
  51. BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
  52. RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
  53. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
  54. SPACE_CADET_ENABLE = no
  55. # Saves about 5% of space:
  56. LINK_TIME_OPTIMIZATION_ENABLE = yes
  57. #LAYOUTS = ortho_1x4