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 PJRC Teensy
  3. #
  4. # Target file name (without extension).
  5. TARGET = x68k_usb_pjrc
  6. # Directory common source filess exist
  7. TOP_DIR = ../..
  8. # Directory keyboard dependent files exist
  9. TARGET_DIR = .
  10. # keyboard dependent files
  11. SRC = keymap.c \
  12. matrix.c \
  13. led.c \
  14. protocol/x68k.c
  15. # protocol/serial_uart.c
  16. CONFIG_H = config_pjrc.h
  17. # MCU name, you MUST set this to match the board you are using
  18. # type "make clean" after changing this, so all files will be rebuilt
  19. #MCU = at90usb162 # Teensy 1.0
  20. MCU = atmega32u4 # Teensy 2.0
  21. #MCU = at90usb646 # Teensy++ 1.0
  22. #MCU = at90usb1286 # Teensy++ 2.0
  23. # Processor frequency.
  24. # Normally the first thing your program should do is set the clock prescaler,
  25. # so your program will run at the correct speed. You should also set this
  26. # variable to same clock speed. The _delay_ms() macro uses this, and many
  27. # examples use this variable to calculate timings. Do not add a "UL" here.
  28. F_CPU = 16000000
  29. # Boot Section Size in bytes
  30. # Teensy halfKay 512
  31. # Atmel DFU loader 4096
  32. # LUFA bootloader 4096
  33. OPT_DEFS += -DBOOTLOADER_SIZE=4096
  34. # Build Options
  35. # *Comment out* to disable the options.
  36. #
  37. BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
  38. MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
  39. EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
  40. CONSOLE_ENABLE = yes # Console for debug(+400)
  41. COMMAND_ENABLE = yes # Commands for debug and configuration
  42. #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
  43. #NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
  44. #---------------- Programming Options --------------------------
  45. AVRDUDE = avrdude
  46. # Type: avrdude -c ? to get a full listing.
  47. AVRDUDE_PROGRAMMER = avr109
  48. AVRDUDE_PORT = /dev/ttyACM0
  49. AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
  50. #AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
  51. # Uncomment the following if you want avrdude's erase cycle counter.
  52. # Note that this counter needs to be initialized first using -Yn,
  53. # see avrdude manual.
  54. #AVRDUDE_ERASE_COUNTER = -y
  55. # Uncomment the following if you do /not/ wish a verification to be
  56. # performed after programming the device.
  57. #AVRDUDE_NO_VERIFY = -V
  58. # Increase verbosity level. Please use this when submitting bug
  59. # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
  60. # to submit bug reports.
  61. #AVRDUDE_VERBOSE = -v -v
  62. AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
  63. #AVRDUDE_FLAGS = -p $(MCU) -c $(AVRDUDE_PROGRAMMER)
  64. AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
  65. AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
  66. AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
  67. #PROGRAM_CMD = $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
  68. #PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex
  69. PROGRAM_CMD = dfu-programmer atmega32u4 flash $(TARGET).hex
  70. # Search Path
  71. VPATH += $(TARGET_DIR)
  72. VPATH += $(TOP_DIR)
  73. include $(TOP_DIR)/protocol/pjrc.mk
  74. include $(TOP_DIR)/protocol.mk
  75. include $(TOP_DIR)/common.mk
  76. include $(TOP_DIR)/rules.mk