1
0

Makefile.2560 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #
  2. # Makefile for 2560 AVR chips
  3. #
  4. # * Copyright 2013-2015 by Bill Westfield, Marek Wodzinski. 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 atmega2560 - ATmega2560p (100pin, 256k)\n"
  10. atmega2560: TARGET = atmega2560
  11. atmega2560: MCU_TARGET = atmega2560
  12. atmega2560: CFLAGS += $(COMMON_OPTIONS) -DBIGBOOT
  13. atmega2560: AVR_FREQ ?= 16000000L
  14. atmega2560: CFLAGS += $(UART_CMD)
  15. atmega2560: $(PROGRAM)_atmega2560.hex
  16. ifndef PRODUCTION
  17. atmega2560: $(PROGRAM)_atmega2560.lst
  18. endif
  19. atmega2560_isp: atmega2560
  20. atmega2560_isp: TARGET = atmega2560
  21. atmega2560_isp: MCU_TARGET = atmega2560
  22. # 1024 byte boot, JTAG disabled
  23. atmega2560_isp: HFUSE ?= DE
  24. # Full Swing xtal (16MHz) 16KCK/14CK+65ms
  25. atmega2560_isp: LFUSE ?= F7
  26. # 2.7V brownout
  27. atmega2560_isp: EFUSE ?= FD
  28. atmega2560_isp: isp
  29. #
  30. # Board-level targets
  31. #
  32. # Arduino/Geniuno MEGA 256 has a minimum boot size of 1024 bytes, so enable extra functions
  33. #
  34. HELPTEXT += "target mega2560 - Arduino MEGA2560 board, 2560ADK\n"
  35. mega2560: TARGET = $@
  36. mega2560: CHIP = atmega2560
  37. mega2560:
  38. "$(MAKE)" $(CHIP) AVR_FREQ=16000000L
  39. mv $(PROGRAM)_$(CHIP).hex $(PROGRAM)_$(TARGET).hex
  40. ifndef PRODUCTION
  41. mv $(PROGRAM)_$(CHIP).lst $(PROGRAM)_$(TARGET).lst
  42. endif
  43. mega2560_isp: mega256
  44. mega2560_isp: TARGET = mega2560
  45. mega2560_isp: MCU_TARGET = atmega2560
  46. # 1024 byte boot, JTAG disabled
  47. mega2560_isp: HFUSE ?= DE
  48. # Full swing xtal (16MHz) 16KCK/14CK+65ms
  49. mega2560_isp: LFUSE ?= F7
  50. # 2.7V brownout
  51. mega2560_isp: EFUSE ?= FD
  52. mega2560_isp: isp