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 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # Target file name (without extension).
  2. TARGET = ibm4704_usb
  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 = matrix.c \
  9. led.c \
  10. protocol/ibm4704.c
  11. ifdef KEYMAP
  12. SRC := keymap_$(KEYMAP).c $(SRC)
  13. else
  14. SRC := keymap_plain.c $(SRC)
  15. endif
  16. CONFIG_H = config.h
  17. # MCU name
  18. # TMK Converter rev.2
  19. MCU ?= atmega32u2
  20. # Processor frequency.
  21. # This will define a symbol, F_CPU, in all source code files equal to the
  22. # processor frequency in Hz. You can then use this symbol in your source code to
  23. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  24. # automatically to create a 32-bit value in your source code.
  25. #
  26. # This will be an integer division of F_USB below, as it is sourced by
  27. # F_USB after it has run through any CPU prescalers. Note that this value
  28. # does not *change* the processor frequency - it should merely be updated to
  29. # reflect the processor speed set externally so that the code can use accurate
  30. # software delays.
  31. F_CPU = 16000000
  32. #
  33. # LUFA specific
  34. #
  35. # Target architecture (see library "Board Types" documentation).
  36. ARCH = AVR8
  37. # Input clock frequency.
  38. # This will define a symbol, F_USB, in all source code files equal to the
  39. # input clock frequency (before any prescaling is performed) in Hz. This value may
  40. # differ from F_CPU if prescaling is used on the latter, and is required as the
  41. # raw input clock is fed directly to the PLL sections of the AVR for high speed
  42. # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
  43. # at the end, this will be done automatically to create a 32-bit value in your
  44. # source code.
  45. #
  46. # If no clock division is performed on the input clock inside the AVR (via the
  47. # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
  48. F_USB = $(F_CPU)
  49. # Interrupt driven control endpoint task(+60)
  50. OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
  51. # Boot Section Size in *bytes*
  52. # Teensy halfKay 512
  53. # Teensy++ halfKay 1024
  54. # Atmel DFU loader 4096
  55. # LUFA bootloader 4096
  56. # USBaspLoader 2048
  57. OPT_DEFS += -DBOOTLOADER_SIZE=4096
  58. # Build Options
  59. # comment out to disable the options.
  60. #
  61. #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
  62. MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
  63. EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
  64. CONSOLE_ENABLE = yes # Console for debug(+400)
  65. COMMAND_ENABLE = yes # Commands for debug and configuration
  66. #NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
  67. # Search Path
  68. VPATH += $(TARGET_DIR)
  69. VPATH += $(TMK_DIR)
  70. include $(TMK_DIR)/protocol.mk
  71. include $(TMK_DIR)/protocol/lufa.mk
  72. include $(TMK_DIR)/common.mk
  73. include $(TMK_DIR)/rules.mk