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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. # Target file name (without extension).
  2. TARGET = ps2_usb_vusb
  3. # Directory common source filess exist
  4. TMK_DIR = ../../tmk_core
  5. # Directory keyboard dependent files exist
  6. TARGET_DIR = .
  7. # keyboard dependent files
  8. SRC = matrix.c \
  9. led.c
  10. ifdef KEYMAP
  11. SRC := keymap_$(KEYMAP).c $(SRC)
  12. else
  13. SRC := keymap_plain.c $(SRC)
  14. endif
  15. CONFIG_H = config.h
  16. # Use USART for PS/2. With V-USB INT and BUSYWAIT code is not useful.
  17. PS2_USE_USART = yes
  18. # V-USB debug level: To use ps2_usart.c level must be 0
  19. # ps2_usart.c requires USART to receive PS/2 signal.
  20. OPT_DEFS += -DDEBUG_LEVEL=0
  21. # MCU name, you MUST set this to match the board you are using
  22. # type "make clean" after changing this, so all files will be rebuilt
  23. #MCU = at90usb162 # Teensy 1.0
  24. #MCU = atmega32u4 # Teensy 2.0
  25. #MCU = at90usb646 # Teensy++ 1.0
  26. #MCU = at90usb1286 # Teensy++ 2.0
  27. #MCU = atmega168
  28. MCU = atmega328p
  29. # Processor frequency.
  30. # Normally the first thing your program should do is set the clock prescaler,
  31. # so your program will run at the correct speed. You should also set this
  32. # variable to same clock speed. The _delay_ms() macro uses this, and many
  33. # examples use this variable to calculate timings. Do not add a "UL" here.
  34. F_CPU = 12000000
  35. # Build Options
  36. # comment out to disable the options.
  37. #
  38. MOUSEKEY_ENABLE = yes # Mouse keys
  39. EXTRAKEY_ENABLE = yes # Audio control and System control
  40. #NKRO_ENABLE = yes # USB Nkey Rollover
  41. NO_UART = yes # UART is unavailable
  42. #---------------- Programming Options --------------------------
  43. AVRDUDE = avrdude
  44. # Type: avrdude -c ? to get a full listing.
  45. AVRDUDE_PROGRAMMER = usbasp
  46. AVRDUDE_PORT =
  47. AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
  48. #AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
  49. # Uncomment the following if you want avrdude's erase cycle counter.
  50. # Note that this counter needs to be initialized first using -Yn,
  51. # see avrdude manual.
  52. #AVRDUDE_ERASE_COUNTER = -y
  53. # Uncomment the following if you do /not/ wish a verification to be
  54. # performed after programming the device.
  55. #AVRDUDE_NO_VERIFY = -V
  56. # Increase verbosity level. Please use this when submitting bug
  57. # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
  58. # to submit bug reports.
  59. #AVRDUDE_VERBOSE = -v -v
  60. #AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
  61. AVRDUDE_FLAGS = -p $(MCU) -c $(AVRDUDE_PROGRAMMER)
  62. AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
  63. AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
  64. AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
  65. PROGRAM_CMD = $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
  66. # Boot Section Size in bytes
  67. # Teensy halfKay 512
  68. # Atmel DFU loader 4096
  69. # LUFA bootloader 4096
  70. # USBasp 2048
  71. OPT_DEFS += -DBOOTLOADER_SIZE=2048
  72. # Search Path
  73. VPATH += $(TARGET_DIR)
  74. VPATH += $(TMK_DIR)
  75. include $(TMK_DIR)/protocol.mk
  76. include $(TMK_DIR)/common.mk
  77. include $(TMK_DIR)/protocol/vusb.mk
  78. include $(TMK_DIR)/rules.mk