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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #
  2. # Makefile for V-USB
  3. #
  4. # Target file name (without extension).
  5. TARGET = hhkb_vusb
  6. # Directory common source filess exist
  7. TMK_DIR = ../../tmk_core
  8. # Directory keyboard dependent files exist
  9. TARGET_DIR = .
  10. # keyboard dependent files
  11. SRC = \
  12. keymap.c \
  13. matrix.c \
  14. led.c
  15. CONFIG_H = config_vusb.h
  16. # V-USB debug level: To use ps2_usart.c level must be 0
  17. # ps2_usart.c requires USART to receive PS/2 signal.
  18. OPT_DEFS = -DDEBUG_LEVEL=0
  19. # MCU name, you MUST set this to match the board you are using
  20. # type "make clean" after changing this, so all files will be rebuilt
  21. MCU = atmega328p
  22. # avrdude doesn't know atmega168p
  23. AVRDUDE_MCU = $(MCU)
  24. # Processor frequency.
  25. # Normally the first thing your program should do is set the clock prescaler,
  26. # so your program will run at the correct speed. You should also set this
  27. # variable to same clock speed. The _delay_ms() macro uses this, and many
  28. # examples use this variable to calculate timings. Do not add a "UL" here.
  29. F_CPU = 12000000
  30. # Build Options
  31. # comment out to disable the options.
  32. #
  33. BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
  34. MOUSEKEY_ENABLE = yes # Mouse keys
  35. EXTRAKEY_ENABLE = yes # Audio control and System control
  36. CONSOLE_ENABLE = yes # Console for debug
  37. COMMAND_ENABLE = yes # Commands for debug and configuration
  38. #NKRO_ENABLE = yes # USB Nkey Rollover
  39. #---------------- Programming Options --------------------------
  40. AVRDUDE = avrdude
  41. # Type: avrdude -c ? to get a full listing.
  42. AVRDUDE_PROGRAMMER = usbasp
  43. AVRDUDE_PORT =
  44. AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
  45. #AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
  46. # Uncomment the following if you want avrdude's erase cycle counter.
  47. # Note that this counter needs to be initialized first using -Yn,
  48. # see avrdude manual.
  49. #AVRDUDE_ERASE_COUNTER = -y
  50. # Uncomment the following if you do /not/ wish a verification to be
  51. # performed after programming the device.
  52. #AVRDUDE_NO_VERIFY = -V
  53. # Increase verbosity level. Please use this when submitting bug
  54. # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
  55. # to submit bug reports.
  56. #AVRDUDE_VERBOSE = -v -v
  57. #AVRDUDE_FLAGS = -p $(AVRDUDE_MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
  58. AVRDUDE_FLAGS = -p $(AVRDUDE_MCU) -c $(AVRDUDE_PROGRAMMER)
  59. AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
  60. AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
  61. AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
  62. PROGRAM_CMD = $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
  63. # Search Path
  64. VPATH += $(TARGET_DIR)
  65. VPATH += $(TMK_DIR)
  66. include $(TMK_DIR)/protocol/vusb.mk
  67. include $(TMK_DIR)/common.mk
  68. include $(TMK_DIR)/rules.mk
  69. debug-on: EXTRAFLAGS += -DDEBUG
  70. debug-on: all