Makefile.extras 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. #
  2. # Makefile for "other" implemented platforms.
  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. #
  8. #
  9. # Extra chips (maybe) supported by optiboot
  10. # Note that these are usually only minimally tested.
  11. #
  12. #
  13. # ATmega88
  14. #
  15. atmega88: TARGET = atmega88
  16. atmega88: MCU_TARGET = atmega88
  17. atmega88: CFLAGS += $(COMMON_OPTIONS)
  18. atmega88: AVR_FREQ ?= 16000000L
  19. atmega88: LDSECTIONS = -Wl,--section-start=.text=0x1e00 -Wl,--section-start=.version=0x1ffe -Wl,--gc-sections -Wl,--undefined=optiboot_version
  20. atmega88: $(PROGRAM)_atmega88.hex
  21. atmega88: $(PROGRAM)_atmega88.lst
  22. atmega88_isp: atmega88
  23. atmega88_isp: TARGET = atmega88
  24. atmega88_isp: MCU_TARGET = atmega88
  25. # 2.7V brownout
  26. atmega88_isp: HFUSE ?= DD
  27. # Low power xtal (16MHz) 16KCK/14CK+65ms
  28. atmega88_isp: LFUSE ?= FF
  29. # 512 byte boot
  30. atmega88_isp: EFUSE ?= 04
  31. atmega88_isp: isp
  32. atmega88p_isp: atmega88
  33. atmega88p_isp: TARGET = atmega88
  34. atmega88p_isp: MCU_TARGET = atmega88p
  35. # 2.7V brownout
  36. atmega88p_isp: HFUSE ?= DD
  37. # Low power xtal (16MHz) 16KCK/14CK+65ms
  38. atmega88p_isp: LFUSE ?= FF
  39. # 512 byte boot
  40. atmega88p_isp: EFUSE ?= 04
  41. atmega88p_isp: isp
  42. #
  43. # ATmega168p [QFN32]
  44. #
  45. atmega168p: TARGET = atmega168p
  46. atmega168p: MCU_TARGET = atmega168p
  47. atmega168p: CFLAGS += $(COMMON_OPTIONS)
  48. atmega168p: AVR_FREQ ?= 16000000L
  49. atmega168p: $(PROGRAM)_atmega168p_16MHz.hex
  50. atmega168p: $(PROGRAM)_atmega168p_16MHz.lst
  51. atmega168p_isp: atmega168p
  52. atmega168p_isp: TARGET = atmega168p
  53. # 2.7V brownout
  54. atmega168p_isp: HFUSE ?= DD
  55. # Low power xtal (16MHz) 16KCK/14CK+65ms
  56. atmega168p_isp: LFUSE ?= FF
  57. # 512 byte boot
  58. atmega168p_isp: EFUSE ?= 04
  59. atmega168p_isp: isp
  60. #
  61. # ATmega32
  62. #
  63. atmega32: TARGET = atmega32
  64. atmega32: MCU_TARGET = atmega32
  65. atmega32: CFLAGS += $(COMMON_OPTIONS)
  66. atmega32: AVR_FREQ ?= 11059200L
  67. atmega32: LDSECTIONS = -Wl,--section-start=.text=0x7e00 -Wl,--section-start=.version=0x7ffe
  68. atmega32: $(PROGRAM)_atmega32.hex
  69. atmega32: $(PROGRAM)_atmega32.lst
  70. atmega32_isp: atmega32
  71. atmega32_isp: TARGET = atmega32
  72. atmega32_isp: MCU_TARGET = atmega32
  73. # No OCD or JTAG, SPIEN, CKOPT (for full swing xtal), Bootsize=512B
  74. atmega32_isp: HFUSE ?= CE
  75. # 2.7V brownout, 16MHz Xtal, 16KCK/14CK+65ms
  76. atmega32_isp: LFUSE ?= BF
  77. atmega32_isp: isp
  78. #
  79. # ATtiny84
  80. #
  81. attiny84: TARGET = attiny84
  82. attiny84: MCU_TARGET = attiny84
  83. attiny84: CFLAGS += $(COMMON_OPTIONS) -DSOFT_UART -DVIRTUAL_BOOT_PARTITION -Dsave_vect_num=4
  84. attiny84: LDSECTIONS = -Wl,--section-start=.text=0x1d00 -Wl,--section-start=.version=0x1ffe -Wl,--gc-sections -Wl,--undefined=optiboot_version
  85. attiny84: $(PROGRAM)_attiny84.hex
  86. attiny84: $(PROGRAM)_attiny84.lst
  87. # 1MHz clocked platforms/boards
  88. #
  89. # These are capable of 9600 baud
  90. #
  91. luminet: TARGET = $@
  92. luminet: CHIP = attiny84
  93. luminet:
  94. $(MAKE) $(CHIP) AVR_FREQ=1000000L LED_START_FLASHES=0 BAUD_RATE=9600
  95. mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
  96. mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
  97. luminet_isp: luminet
  98. luminet_isp: TARGET = luminet
  99. luminet_isp: MCU_TARGET = attiny84
  100. # Brownout disabled
  101. luminet_isp: HFUSE ?= DF
  102. # 1MHz internal oscillator, slowly rising power
  103. luminet_isp: LFUSE ?= 62
  104. # Self-programming enable
  105. luminet_isp: EFUSE ?= FE
  106. luminet_isp: isp