usb-avr-cpld experiment board with FTDI FT232RL, ATMEGA88 & XC9572XL

makefile 640B

1234567891011121314151617181920212223242526
  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/