usb-avr-cpld experiment board with FTDI FT232RL, ATMEGA88 & XC9572XL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
640 B

  1. #AVR-GCC Makefile
  2. PROJECT = avrtest
  3. SOURCES = src/avrtest.c
  4. CC = avr-gcc
  5. OBJCOPY = avr-objcopy
  6. MMCU = atmega88
  7. F_CPU = 10000000UL
  8. #F_CPU = 11059200UL
  9. DUMMY_BINARY:=$(shell mkdir -p binary)
  10. CFLAGS = -mmcu=$(MMCU) -DF_CPU=$(F_CPU) -Wall -Os -std=gnu99
  11. compile : binary/$(PROJECT).out
  12. binary/$(PROJECT).hex: binary/$(PROJECT).out
  13. $(OBJCOPY) -j .text -O ihex binary/$(PROJECT).out binary/$(PROJECT).hex
  14. binary/$(PROJECT).out: $(SOURCES)
  15. $(CC) $(CFLAGS) -I./ -o binary/$(PROJECT).out $(SOURCES)
  16. program: binary/$(PROJECT).hex
  17. avrdude -p m88 -c buspirate -P /dev/cu.PL2303-00* -e -U flash:w:binary/$(PROJECT).hex
  18. clean:
  19. rm -rf binary/