Keyboard firmwares for Atmel AVR and Cortex-M
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

Makefile 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. #----------------------------------------------------------------------------
  2. # On command line:
  3. #
  4. # make all = Make software.
  5. #
  6. # make clean = Clean out built project files.
  7. #
  8. # make coff = Convert ELF to AVR COFF.
  9. #
  10. # make extcoff = Convert ELF to AVR Extended COFF.
  11. #
  12. # make program = Download the hex file to the device.
  13. # Please customize your programmer settings(PROGRAM_CMD)
  14. #
  15. # make teensy = Download the hex file to the device, using teensy_loader_cli.
  16. # (must have teensy_loader_cli installed).
  17. #
  18. # make dfu = Download the hex file to the device, using dfu-programmer (must
  19. # have dfu-programmer installed).
  20. #
  21. # make flip = Download the hex file to the device, using Atmel FLIP (must
  22. # have Atmel FLIP installed).
  23. #
  24. # make dfu-ee = Download the eeprom file to the device, using dfu-programmer
  25. # (must have dfu-programmer installed).
  26. #
  27. # make flip-ee = Download the eeprom file to the device, using Atmel FLIP
  28. # (must have Atmel FLIP installed).
  29. #
  30. # make debug = Start either simulavr or avarice as specified for debugging,
  31. # with avr-gdb or avr-insight as the front end for debugging.
  32. #
  33. # make filename.s = Just compile filename.c into the assembler code only.
  34. #
  35. # make filename.i = Create a preprocessed source file for use in submitting
  36. # bug reports to the GCC project.
  37. #
  38. # To rebuild project do "make clean" then "make all".
  39. #----------------------------------------------------------------------------
  40. # Target file name (without extension).
  41. TARGET = usbkbd
  42. # Directory keyboard dependent files exist
  43. TARGET_DIR = .
  44. # MCU name
  45. MCU = atmega32u4
  46. # Processor frequency.
  47. # This will define a symbol, F_CPU, in all source code files equal to the
  48. # processor frequency in Hz. You can then use this symbol in your source code to
  49. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  50. # automatically to create a 32-bit value in your source code.
  51. #
  52. # This will be an integer division of F_USB below, as it is sourced by
  53. # F_USB after it has run through any CPU prescalers. Note that this value
  54. # does not *change* the processor frequency - it should merely be updated to
  55. # reflect the processor speed set externally so that the code can use accurate
  56. # software delays.
  57. F_CPU = 16000000
  58. ARDUINO_DIR = arduino-1.0.1/cores
  59. ARDUINO_SRC = \
  60. arduino/Print.cpp \
  61. arduino/Stream.cpp \
  62. arduino/wiring.c
  63. # arduino/main.cpp \
  64. # arduino/USBCore.cpp \
  65. # arduino/CDC.cpp \
  66. # arduino/HID.cpp \
  67. # arduino/HardwareSerial.cpp \
  68. # arduino/IPAddress.cpp \
  69. # arduino/Tone.cpp \
  70. # arduino/WMath.cpp \
  71. # arduino/WInterrupts.c \
  72. # arduino/wiring_analog.c \
  73. # arduino/wiring_pulse.c \
  74. # arduino/wiring_shift.c
  75. # arduino/wiring_digital.c \
  76. # arduino/WString.cpp \
  77. # arduino/new.cpp \
  78. USB_HOST_DIR = ./USB_Host_Shield_2.0
  79. USB_HOST_SRC = \
  80. Usb.cpp \
  81. cdcacm.cpp \
  82. cdcftdi.cpp \
  83. cdcprolific.cpp \
  84. hid.cpp \
  85. hidboot.cpp \
  86. hiduniversal.cpp \
  87. hidusagetitlearrays.cpp \
  88. hidescriptorparser.cpp \
  89. message.cpp \
  90. parsetools.cpp
  91. #PS3BT.cpp \
  92. #PS3USB.cpp \
  93. #RFCOMM.cpp \
  94. #XBOXUSB.cpp \
  95. #adk.cpp \
  96. #masstorage.cpp \
  97. #max_LCD.cpp \
  98. #usbhub.cpp
  99. #SRC = host_kbd.cpp
  100. SRC = main.cpp
  101. SRC += parser.cpp
  102. SRC += NullSerial.cpp
  103. SRC += $(USB_HOST_SRC)
  104. SRC += $(ARDUINO_SRC)
  105. OPT_DEFS = -DARDUINO=101 -DUSB_VID=0x2341 -DUSB_PID=0x8036
  106. # Search Path
  107. VPATH += $(TARGET_DIR)
  108. VPATH += $(USB_HOST_DIR)
  109. VPATH += $(ARDUINO_DIR)
  110. # for Arduino.h
  111. VPATH += arduino-1.0.1/cores/arduino
  112. # for pins_arduino.h
  113. VPATH += arduino-1.0.1/variants/leonardo
  114. # Ad hoc workaround to override original arduino/USBAPI.h with our own USBAPI.h.
  115. # Obsolete but needed in order to remove directory including the current input file from search list.
  116. # Option -iquote can't replace -I- for this purpose.
  117. EXTRAFLAGS += -I-
  118. # program Leonardo
  119. PROGRAM_CMD = avrdude -patmega32u4 -cavr109 -P$(DEV) -b57600 -Uflash:w:$(TARGET).hex
  120. include ../../rules.mk