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.tmk_rev2 2.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #
  2. # Makefile for TMK keyboard converter rev2
  3. # https://github.com/tmk/keyboard_converter#pcb-rev2
  4. #
  5. # Target file name (without extension).
  6. TARGET = ps2_usb_tmk_rev2
  7. # Directory common source filess exist
  8. TMK_DIR = ../../tmk_core
  9. # Directory keyboard dependent files exist
  10. TARGET_DIR = .
  11. # project specific files
  12. SRC = matrix.c \
  13. led.c
  14. ifdef KEYMAP
  15. SRC := keymap_$(KEYMAP).c $(SRC)
  16. else
  17. SRC := keymap_plain.c $(SRC)
  18. endif
  19. CONFIG_H = config_tmk_rev2.h
  20. # MCU name
  21. MCU = atmega32u2
  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. # Boot Section Size in *bytes*
  52. # Teensy halfKay 512
  53. # Teensy++ halfKay 1024
  54. # Atmel DFU loader 4096
  55. # LUFA bootloader 4096
  56. # USBaspLoader 2048
  57. OPT_DEFS += -DBOOTLOADER_SIZE=4096
  58. # Build Options
  59. # comment out to disable the options.
  60. #
  61. #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
  62. MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
  63. EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
  64. CONSOLE_ENABLE = yes # Console for debug(+400)
  65. COMMAND_ENABLE = yes # Commands for debug and configuration
  66. #NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
  67. # PS/2 Options
  68. #
  69. PS2_USE_INT = yes # uses external interrupt for falling edge of PS/2 clock pin
  70. #PS2_USE_BUSYWAIT = yes # uses primitive reference code
  71. # Search Path
  72. VPATH += $(TARGET_DIR)
  73. VPATH += $(TMK_DIR)
  74. include $(TMK_DIR)/protocol.mk
  75. include $(TMK_DIR)/protocol/lufa.mk
  76. include $(TMK_DIR)/common.mk
  77. include $(TMK_DIR)/rules.mk