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.4KB

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