Makefile.1284 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. #
  2. # Makefile for 40-pin AVR chips, including ATmega644 and ATmega1284
  3. #
  4. # * Copyright 2013-2015 by Bill Westfield. Part of Optiboot.
  5. # * This software is licensed under version 2 of the Gnu Public Licence.
  6. # * See optiboot.c for details.
  7. # Chip level targets
  8. #
  9. HELPTEXT += "target atmega644p - ATmega644p\n"
  10. atmega644p: TARGET = atmega644p
  11. atmega644p: MCU_TARGET = atmega644p
  12. atmega644p: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT
  13. atmega644p: AVR_FREQ ?= 16000000L
  14. atmega644p: CFLAGS += $(UART_CMD)
  15. atmega644p: $(PROGRAM)_atmega644p.hex
  16. ifndef PRODUCTION
  17. atmega644p: $(PROGRAM)_atmega644p.lst
  18. endif
  19. HELPTEXT += "target atmega1284 - ATmega1284p (40 pin, 128k)\n"
  20. atmega1284: TARGET = atmega1284p
  21. atmega1284: MCU_TARGET = atmega1284p
  22. atmega1284: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT
  23. atmega1284: AVR_FREQ ?= 16000000L
  24. atmega1284: CFLAGS += $(UART_CMD)
  25. atmega1284: $(PROGRAM)_atmega1284p.hex
  26. ifndef PRODUCTION
  27. atmega1284: $(PROGRAM)_atmega1284p.lst
  28. endif
  29. atmega1284p: atmega1284
  30. atmega1284_isp: atmega1284
  31. atmega1284_isp: TARGET = atmega1284p
  32. atmega1284_isp: MCU_TARGET = atmega1284p
  33. # 1024 byte boot
  34. atmega1284_isp: HFUSE ?= DE
  35. # Full Swing xtal (16MHz) 16KCK/14CK+65ms
  36. atmega1284_isp: LFUSE ?= F7
  37. # 2.7V brownout
  38. atmega1284_isp: EFUSE ?= FD
  39. atmega1284_isp: isp
  40. #
  41. # Board-level targets
  42. #
  43. # Sanguino has a minimum boot size of 1024 bytes, so enable extra functions
  44. #
  45. HELPTEXT += "target sanguino - ATmega644p board\n"
  46. sanguino: TARGET = $@
  47. sanguino: CHIP = atmega644p
  48. sanguino:
  49. "$(MAKE)" $(CHIP) AVR_FREQ=16000000L LED=B0
  50. mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
  51. ifndef PRODUCTION
  52. mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
  53. endif
  54. sanguino_isp: sanguino
  55. sanguino_isp: TARGET = sanguino
  56. sanguino_isp: MCU_TARGET = atmega644p
  57. # 1024 byte boot
  58. sanguino_isp: HFUSE ?= DE
  59. # Full swing xtal (16MHz) 16KCK/14CK+65ms
  60. sanguino_isp: LFUSE ?= F7
  61. # 2.7V brownout
  62. sanguino_isp: EFUSE ?= FD
  63. sanguino_isp: isp
  64. HELPTEXT += "target mighty1284 - ManiacBug Mighty1284 board\n"
  65. mighty1284: TARGET = $@
  66. mighty1284: CHIP = atmega1284p
  67. mighty1284:
  68. "$(MAKE)" $(CHIP) AVR_FREQ=16000000L LED=B7
  69. mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
  70. ifndef PRODUCTION
  71. mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
  72. endif
  73. mighty1284_isp: mighty1284
  74. mighty1284_isp: TARGET = mighty1284
  75. mighty1284_isp: MCU_TARGET = atmega1284p
  76. # 1024 byte boot
  77. mighty1284_isp: HFUSE ?= DE
  78. # Full swing xtal (16MHz) 16KCK/14CK+65ms
  79. mighty1284_isp: LFUSE ?= F7
  80. # 2.7V brownout
  81. mighty1284_isp: EFUSE ?= FD
  82. mighty1284_isp: isp
  83. HELPTEXT += "target bobuino - Crossroads 1284 board\n"
  84. bobuino: TARGET = $@
  85. bobuino: CHIP = atmega1284p
  86. bobuino:
  87. "$(MAKE)" $(CHIP) AVR_FREQ=16000000L LED=B7
  88. mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
  89. ifndef PRODUCTION
  90. mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
  91. endif
  92. bobuino_isp: bobuino
  93. bobuino_isp: TARGET = bobuino
  94. bobuino_isp: MCU_TARGET = atmega1284p
  95. # 1024 byte boot
  96. bobuino_isp: HFUSE ?= DE
  97. # Full swing xtal (16MHz) 16KCK/14CK+65ms
  98. bobuino_isp: LFUSE ?= F7
  99. # 2.7V brownout
  100. bobuino_isp: EFUSE ?= FD
  101. bobuino_isp: isp
  102. #
  103. # Wicked Devices "Wildfire" boards (1284 with wireless!)
  104. #
  105. HELPTEXT += "target wildfirev2 - Wicked Devices board\n"
  106. wildfirev2: TARGET = $@
  107. wildfirev2: CHIP = atmega1284p
  108. wildfirev2:
  109. "$(MAKE)" $(CHIP) AVR_FREQ=16000000L LED=B7 BAUD_RATE=1000000
  110. mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
  111. ifndef PRODUCTION
  112. mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
  113. endif
  114. wildfirev2_isp: wildfirev2
  115. wildfirev2_isp: TARGET = wildfirev2
  116. wildfirev2_isp: MCU_TARGET = atmega1284p
  117. # 1024 byte boot
  118. wildfirev2_isp: HFUSE ?= DE
  119. # Full swing xtal (16MHz) 16KCK/14CK+65ms
  120. wildfirev2_isp: LFUSE ?= F7
  121. # 2.7V brownout
  122. wildfirev2_isp: EFUSE ?= FD
  123. wildfirev2_isp: isp
  124. HELPTEXT += "target wildfirev3 - Wicked Devices board\n"
  125. wildfirev3: TARGET = $@
  126. wildfirev3: CHIP = atmega1284p
  127. wildfirev3:
  128. "$(MAKE)" $(CHIP) AVR_FREQ=16000000L LED=B5
  129. mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
  130. ifndef PRODUCTION
  131. mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
  132. endif
  133. wildfirev3_isp: wildfirev3
  134. wildfirev3_isp: TARGET = wildfirev3
  135. wildfirev3_isp: MCU_TARGET = atmega1284p
  136. # 1024 byte boot
  137. wildfirev3_isp: HFUSE ?= DE
  138. # Full swing xtal (16MHz) 16KCK/14CK+65ms
  139. wildfirev3_isp: LFUSE ?= F7
  140. # 2.7V brownout
  141. wildfirev3_isp: EFUSE ?= FD
  142. wildfirev3_isp: isp