Misc files
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. # Target file name (without extension).
  2. TARGET ?= 108
  3. # Directory common source filess exist
  4. TMK_DIR ?= ../../tmk_core
  5. # Directory keyboard dependent files exist
  6. TARGET_DIR ?= .
  7. # project specific files
  8. SRC ?= keymap_108.c \
  9. matrix.c \
  10. led.c
  11. CONFIG_H ?= config.h
  12. # MCU name
  13. MCU ?= atmega32
  14. # Defines needed to use correct registers for the atmega32
  15. OPT_DEFS += -DNO_CLKPR -DTIMER0_COMP -DTIMER_PRESCALER=1024
  16. # Processor frequency.
  17. # This will define a symbol, F_CPU, in all source code files equal to the
  18. # processor frequency in Hz. You can then use this symbol in your source code to
  19. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  20. # automatically to create a 32-bit value in your source code.
  21. #
  22. # This will be an integer division of F_USB below, as it is sourced by
  23. # F_USB after it has run through any CPU prescalers. Note that this value
  24. # does not *change* the processor frequency - it should merely be updated to
  25. # reflect the processor speed set externally so that the code can use accurate
  26. # software delays.
  27. F_CPU ?= 16000000
  28. # Input clock frequency.
  29. # This will define a symbol, F_USB, in all source code files equal to the
  30. # input clock frequency (before any prescaling is performed) in Hz. This value may
  31. # differ from F_CPU if prescaling is used on the latter, and is required as the
  32. # raw input clock is fed directly to the PLL sections of the AVR for high speed
  33. # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
  34. # at the end, this will be done automatically to create a 32-bit value in your
  35. # source code.
  36. #
  37. # If no clock division is performed on the input clock inside the AVR (via the
  38. # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
  39. F_USB ?= $(F_CPU)
  40. # Interrupt driven control endpoint task(+60)
  41. OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
  42. # Boot Section Size in *bytes*
  43. # Teensy halfKay 512
  44. # Teensy++ halfKay 1024
  45. # Atmel DFU loader 4096
  46. # LUFA bootloader 4096
  47. # USBaspLoader 2048
  48. BOOTLOADER_SIZE ?= 2048
  49. OPT_DEFS += -DBOOTLOADER_SIZE=$(BOOTLOADER_SIZE)
  50. # Build Options
  51. # comment out to disable the options.
  52. #
  53. BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
  54. MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
  55. EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
  56. CONSOLE_ENABLE ?= no # Console for debug disabled, disables also UART RX
  57. COMMAND_ENABLE ?= yes # Commands for debug and configuration
  58. SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
  59. NKRO_ENABLE ?= no # USB Nkey Rollover
  60. ACTIONMAP_ENABLE ?= no # Use 16bit action codes in keymap instead of 8bit keycodes
  61. NO_UART = yes # UART for debugging
  62. # Optimize size but this may cause error "relocation truncated to fit"
  63. #EXTRALDFLAGS = -Wl,--relax
  64. # Search Path
  65. VPATH += $(TARGET_DIR)
  66. VPATH += $(TMK_DIR)
  67. include $(TMK_DIR)/protocol.mk
  68. include $(TMK_DIR)/common.mk
  69. include $(TMK_DIR)/protocol/vusb.mk
  70. include $(TMK_DIR)/rules.mk
  71. #---------------- Programming Options (avrdude) ----------------
  72. AVRDUDE ?= avrdude
  73. # Programming hardware, type: avrdude -c ?
  74. # to get a full listing.
  75. #
  76. # This setting asumes, that you flashed the bootloader first
  77. AVRDUDE_PROGRAMMER ?= usbasp
  78. # com1 = serial port. Use lpt1 to connect to parallel port.
  79. AVRDUDE_PORT ?= /dev/ttyACM0 # programmer connected to serial device
  80. AVRDUDE_WRITE_FLASH ?= -U flash:w:$(TARGET).hex
  81. #AVRDUDE_WRITE_EEPROM ?= -U eeprom:w:$(TARGET).eep
  82. # Brown-out detection level at VCC=2.7 V; [BODLEVEL=1]
  83. # Ext. Crystal Osc.; High Frequency; Start-up time PWRDWN/RESET: 1024 clk + 64 ms; [CKSEL=1111 SUT=00]
  84. # Boot Reset vector Enabled (Jump to bootloader first)
  85. # Serial program downloading (SPI) enabled; [SPIEN=0]
  86. # Watch-dog Timer disabled; [WDTON=0]
  87. # Self Programming disabled; [SELFPRGEN=0]
  88. AVRDUDE_FUSEBITS ?= -U lfuse:w:0x8F:m -U hfuse:w:0xC8:m
  89. # Uncomment the following if you want avrdude's erase cycle counter.
  90. # Note that this counter needs to be initialized first using -Yn,
  91. # see avrdude manual.
  92. #AVRDUDE_ERASE_COUNTER ?= -y
  93. # Uncomment the following if you do /not/ wish a verification to be
  94. # performed after programming the device.
  95. #AVRDUDE_NO_VERIFY ?= -V
  96. # Increase verbosity level. Please use this when submitting bug
  97. # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
  98. # to submit bug reports.
  99. #AVRDUDE_VERBOSE ?= -v -v
  100. AVRDUDE_FLAGS ?= -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
  101. AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
  102. AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
  103. AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
  104. #============================================================================
  105. # Program the device.
  106. program: $(TARGET).hex $(TARGET).eep
  107. $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) $(AVRDUDE_FUSEBITS)
  108. # Set fuses.
  109. fuse:
  110. $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_FUSEBITS)
  111. # Listing of phony targets.
  112. .PHONY : all sizebefore sizeafter gccversion \
  113. build elf hex eep lss sym coff extcoff \
  114. clean program fuse