Makefile.1284 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. atmega644p: TARGET = atmega644p
  10. atmega644p: MCU_TARGET = atmega644p
  11. atmega644p: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT
  12. atmega644p: AVR_FREQ ?= 16000000L
  13. atmega644p: LDSECTIONS = -Wl,--section-start=.text=0xfc00 -Wl,--section-start=.version=0xfffe
  14. atmega644p: CFLAGS += $(UART_CMD)
  15. atmega644p: $(PROGRAM)_atmega644p.hex
  16. atmega644p: $(PROGRAM)_atmega644p.lst
  17. atmega1284: TARGET = atmega1284p
  18. atmega1284: MCU_TARGET = atmega1284p
  19. atmega1284: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT
  20. atmega1284: AVR_FREQ ?= 16000000L
  21. atmega1284: LDSECTIONS = -Wl,--section-start=.text=0x1fc00 -Wl,--section-start=.version=0x1fffe
  22. atmega1284: CFLAGS += $(UART_CMD)
  23. atmega1284: $(PROGRAM)_atmega1284p.hex
  24. atmega1284: $(PROGRAM)_atmega1284p.lst
  25. atmega1284p: atmega1284
  26. atmega1284_isp: atmega1284
  27. atmega1284_isp: TARGET = atmega1284p
  28. atmega1284_isp: MCU_TARGET = atmega1284p
  29. # 1024 byte boot
  30. atmega1284_isp: HFUSE ?= DE
  31. # Full Swing xtal (16MHz) 16KCK/14CK+65ms
  32. atmega1284_isp: LFUSE ?= F7
  33. # 2.7V brownout
  34. atmega1284_isp: EFUSE ?= FD
  35. atmega1284_isp: isp
  36. #
  37. # Board-level targets
  38. #
  39. # Sanguino has a minimum boot size of 1024 bytes, so enable extra functions
  40. #
  41. sanguino: TARGET = $@
  42. sanguino: CHIP = atmega644p
  43. sanguino:
  44. $(MAKE) $(CHIP) AVR_FREQ=16000000L LED=B0
  45. mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
  46. mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
  47. sanguino_isp: sanguino
  48. sanguino_isp: TARGET = sanguino
  49. sanguino_isp: MCU_TARGET = atmega644p
  50. # 1024 byte boot
  51. sanguino_isp: HFUSE ?= DE
  52. # Full swing xtal (16MHz) 16KCK/14CK+65ms
  53. sanguino_isp: LFUSE ?= F7
  54. # 2.7V brownout
  55. sanguino_isp: EFUSE ?= FD
  56. sanguino_isp: isp
  57. mighty1284: TARGET = $@
  58. mighty1284: CHIP = atmega1284p
  59. mighty1284:
  60. $(MAKE) $(CHIP) AVR_FREQ=16000000L LED=B7
  61. mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
  62. mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
  63. mighty1284_isp: mighty1284
  64. mighty1284_isp: TARGET = mighty1284
  65. mighty1284_isp: MCU_TARGET = atmega1284p
  66. # 1024 byte boot
  67. mighty1284_isp: HFUSE ?= DE
  68. # Full swing xtal (16MHz) 16KCK/14CK+65ms
  69. mighty1284_isp: LFUSE ?= F7
  70. # 2.7V brownout
  71. mighty1284_isp: EFUSE ?= FD
  72. mighty1284_isp: isp
  73. bobuino: TARGET = $@
  74. bobuino: CHIP = atmega1284p
  75. bobuino:
  76. $(MAKE) $(CHIP) AVR_FREQ=16000000L LED=B7
  77. mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
  78. mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
  79. bobuino_isp: bobuino
  80. bobuino_isp: TARGET = bobuino
  81. bobuino_isp: MCU_TARGET = atmega1284p
  82. # 1024 byte boot
  83. bobuino_isp: HFUSE ?= DE
  84. # Full swing xtal (16MHz) 16KCK/14CK+65ms
  85. bobuino_isp: LFUSE ?= F7
  86. # 2.7V brownout
  87. bobuino_isp: EFUSE ?= FD
  88. bobuino_isp: isp
  89. #
  90. # Wicked Devices "Wildfire" boards (1284 with wireless!)
  91. #
  92. wildfirev2: TARGET = $@
  93. wildfirev2: CHIP = atmega1284p
  94. wildfirev2:
  95. $(MAKE) $(CHIP) AVR_FREQ=16000000L LED=B7 BAUD_RATE=1000000
  96. mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
  97. mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
  98. wildfirev2_isp: wildfirev2
  99. wildfirev2_isp: TARGET = wildfirev2
  100. wildfirev2_isp: MCU_TARGET = atmega1284p
  101. # 1024 byte boot
  102. wildfirev2_isp: HFUSE ?= DE
  103. # Full swing xtal (16MHz) 16KCK/14CK+65ms
  104. wildfirev2_isp: LFUSE ?= F7
  105. # 2.7V brownout
  106. wildfirev2_isp: EFUSE ?= FD
  107. wildfirev2_isp: isp
  108. wildfirev3: TARGET = $@
  109. wildfirev3: CHIP = atmega1284p
  110. wildfirev3:
  111. $(MAKE) $(CHIP) AVR_FREQ=16000000L LED=B5
  112. mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
  113. mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
  114. wildfirev3_isp: wildfirev3
  115. wildfirev3_isp: TARGET = wildfirev3
  116. wildfirev3_isp: MCU_TARGET = atmega1284p
  117. # 1024 byte boot
  118. wildfirev3_isp: HFUSE ?= DE
  119. # Full swing xtal (16MHz) 16KCK/14CK+65ms
  120. wildfirev3_isp: LFUSE ?= F7
  121. # 2.7V brownout
  122. wildfirev3_isp: EFUSE ?= FD
  123. wildfirev3_isp: isp