Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #
  2. # Makefile for Teensy
  3. #
  4. # Target file name (without extension).
  5. TARGET = xt_usb_lufa
  6. # Directory common source filess exist
  7. TMK_DIR = ../../tmk_core
  8. # Directory keyboard dependent files exist
  9. TARGET_DIR = .
  10. # project specific files
  11. SRC = matrix.c \
  12. led.c
  13. ifdef KEYMAP
  14. SRC := keymap_$(KEYMAP).c $(SRC)
  15. else
  16. SRC := keymap_plain.c $(SRC)
  17. endif
  18. CONFIG_H = config.h
  19. # MCU name
  20. #MCU = at90usb1287
  21. MCU = atmega32u4
  22. # Processor frequency.
  23. # This will define a symbol, F_CPU, in all source code files equal to the
  24. # processor frequency in Hz. You can then use this symbol in your source code to
  25. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  26. # automatically to create a 32-bit value in your source code.
  27. #
  28. # This will be an integer division of F_USB below, as it is sourced by
  29. # F_USB after it has run through any CPU prescalers. Note that this value
  30. # does not *change* the processor frequency - it should merely be updated to
  31. # reflect the processor speed set externally so that the code can use accurate
  32. # software delays.
  33. F_CPU = 16000000
  34. #
  35. # LUFA specific
  36. #
  37. # Target architecture (see library "Board Types" documentation).
  38. ARCH = AVR8
  39. # Input clock frequency.
  40. # This will define a symbol, F_USB, in all source code files equal to the
  41. # input clock frequency (before any prescaling is performed) in Hz. This value may
  42. # differ from F_CPU if prescaling is used on the latter, and is required as the
  43. # raw input clock is fed directly to the PLL sections of the AVR for high speed
  44. # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
  45. # at the end, this will be done automatically to create a 32-bit value in your
  46. # source code.
  47. #
  48. # If no clock division is performed on the input clock inside the AVR (via the
  49. # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
  50. F_USB = $(F_CPU)
  51. # Interrupt driven control endpoint task(+60)
  52. #OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
  53. # Boot Section Size in *bytes*
  54. # Teensy halfKay 512
  55. # Teensy++ halfKay 1024
  56. # Atmel DFU loader 4096
  57. # LUFA bootloader 4096
  58. # USBaspLoader 2048
  59. OPT_DEFS += -DBOOTLOADER_SIZE=512
  60. # Build Options
  61. # comment out to disable the options.
  62. #
  63. #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
  64. MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
  65. EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
  66. CONSOLE_ENABLE = yes # Console for debug(+400)
  67. COMMAND_ENABLE = yes # Commands for debug and configuration
  68. NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
  69. # XT/2 Options
  70. #
  71. XT_USE_INT = yes # uses external interrupt for falling edge of PS/2 clock pin
  72. # Optimize size but this may cause error "relocation truncated to fit"
  73. #EXTRALDFLAGS = -Wl,--relax
  74. # Search Path
  75. VPATH += $(TARGET_DIR)
  76. VPATH += $(TMK_DIR)
  77. include $(TMK_DIR)/protocol.mk
  78. include $(TMK_DIR)/protocol/lufa.mk
  79. include $(TMK_DIR)/common.mk
  80. include $(TMK_DIR)/rules.mk