logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

mcu_selection.mk (3798B)


  1. ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287))
  2. PROTOCOL = LUFA
  3. # Processor frequency.
  4. # This will define a symbol, F_CPU, in all source code files equal to the
  5. # processor frequency in Hz. You can then use this symbol in your source code to
  6. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  7. # automatically to create a 32-bit value in your source code.
  8. #
  9. # This will be an integer division of F_USB below, as it is sourced by
  10. # F_USB after it has run through any CPU prescalers. Note that this value
  11. # does not *change* the processor frequency - it should merely be updated to
  12. # reflect the processor speed set externally so that the code can use accurate
  13. # software delays.
  14. F_CPU ?= 16000000
  15. # LUFA specific
  16. #
  17. # Target architecture (see library "Board Types" documentation).
  18. ARCH = AVR8
  19. # Input clock frequency.
  20. # This will define a symbol, F_USB, in all source code files equal to the
  21. # input clock frequency (before any prescaling is performed) in Hz. This value may
  22. # differ from F_CPU if prescaling is used on the latter, and is required as the
  23. # raw input clock is fed directly to the PLL sections of the AVR for high speed
  24. # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
  25. # at the end, this will be done automatically to create a 32-bit value in your
  26. # source code.
  27. #
  28. # If no clock division is performed on the input clock inside the AVR (via the
  29. # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
  30. F_USB ?= $(F_CPU)
  31. # Interrupt driven control endpoint task
  32. ifeq (,$(filter $(NO_INTERRUPT_CONTROL_ENDPOINT),yes))
  33. OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
  34. endif
  35. ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2))
  36. NO_I2C = yes
  37. endif
  38. endif
  39. ifneq (,$(filter $(MCU),atmega32a))
  40. # MCU name for avrdude
  41. AVRDUDE_MCU = m32
  42. PROTOCOL = VUSB
  43. # Processor frequency.
  44. # This will define a symbol, F_CPU, in all source code files equal to the
  45. # processor frequency in Hz. You can then use this symbol in your source code to
  46. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  47. # automatically to create a 32-bit value in your source code.
  48. F_CPU ?= 12000000
  49. endif
  50. ifneq (,$(filter $(MCU),atmega328p))
  51. # MCU name for avrdude
  52. AVRDUDE_MCU = m328p
  53. PROTOCOL = VUSB
  54. # Processor frequency.
  55. # This will define a symbol, F_CPU, in all source code files equal to the
  56. # processor frequency in Hz. You can then use this symbol in your source code to
  57. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  58. # automatically to create a 32-bit value in your source code.
  59. F_CPU ?= 16000000
  60. endif
  61. ifneq (,$(filter $(MCU),atmega328))
  62. # MCU name for avrdude
  63. AVRDUDE_MCU = m328
  64. PROTOCOL = VUSB
  65. # Processor frequency.
  66. # This will define a symbol, F_CPU, in all source code files equal to the
  67. # processor frequency in Hz. You can then use this symbol in your source code to
  68. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  69. # automatically to create a 32-bit value in your source code.
  70. F_CPU ?= 16000000
  71. endif
  72. ifneq (,$(filter $(MCU),attiny85))
  73. PROTOCOL = VUSB
  74. # Processor frequency.
  75. # This will define a symbol, F_CPU, in all source code files equal to the
  76. # processor frequency in Hz. You can then use this symbol in your source code to
  77. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  78. # automatically to create a 32-bit value in your source code.
  79. F_CPU ?= 16500000
  80. endif