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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

Makefile 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 = main.c \
  12. keymap.c \
  13. matrix.c \
  14. led.c \
  15. x68k.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. # Build Options
  30. # *Comment out* to disable the options.
  31. #
  32. MOUSEKEY_ENABLE = yes # Mouse keys
  33. EXTRAKEY_ENABLE = yes # Audio control and System control
  34. NKRO_ENABLE = yes # USB Nkey Rollover
  35. #---------------- Programming Options --------------------------
  36. AVRDUDE = avrdude
  37. # Type: avrdude -c ? to get a full listing.
  38. AVRDUDE_PROGRAMMER = avr109
  39. AVRDUDE_PORT = /dev/ttyACM0
  40. AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
  41. #AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
  42. # Uncomment the following if you want avrdude's erase cycle counter.
  43. # Note that this counter needs to be initialized first using -Yn,
  44. # see avrdude manual.
  45. #AVRDUDE_ERASE_COUNTER = -y
  46. # Uncomment the following if you do /not/ wish a verification to be
  47. # performed after programming the device.
  48. #AVRDUDE_NO_VERIFY = -V
  49. # Increase verbosity level. Please use this when submitting bug
  50. # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
  51. # to submit bug reports.
  52. #AVRDUDE_VERBOSE = -v -v
  53. AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
  54. #AVRDUDE_FLAGS = -p $(MCU) -c $(AVRDUDE_PROGRAMMER)
  55. AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
  56. AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
  57. AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
  58. #PROGRAM_CMD = $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
  59. #PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex
  60. PROGRAM_CMD = dfu-programmer atmega32u4 flash $(TARGET).hex
  61. include $(TOP_DIR)/protocol/pjrc.mk
  62. include $(TOP_DIR)/protocol.mk
  63. include $(TOP_DIR)/common.mk
  64. include $(TOP_DIR)/rules.mk