|
@ -4,10 +4,12 @@ SOURCES = src/avrtest.c |
|
|
CC = avr-gcc |
|
|
CC = avr-gcc |
|
|
OBJCOPY = avr-objcopy |
|
|
OBJCOPY = avr-objcopy |
|
|
MMCU = atmega88 |
|
|
MMCU = atmega88 |
|
|
|
|
|
F_CPU = 10000000UL |
|
|
|
|
|
#F_CPU = 11059200UL
|
|
|
|
|
|
|
|
|
DUMMY_BINARY:=$(shell mkdir -p binary) |
|
|
DUMMY_BINARY:=$(shell mkdir -p binary) |
|
|
|
|
|
|
|
|
CFLAGS = -mmcu=$(MMCU) -Wall -Os -std=gnu99 |
|
|
|
|
|
|
|
|
CFLAGS = -mmcu=$(MMCU) -DF_CPU=$(F_CPU) -Wall -Os -std=gnu99 |
|
|
|
|
|
|
|
|
compile : binary/$(PROJECT).out |
|
|
compile : binary/$(PROJECT).out |
|
|
|
|
|
|
|
@ -18,7 +20,7 @@ binary/$(PROJECT).out: $(SOURCES) |
|
|
$(CC) $(CFLAGS) -I./ -o binary/$(PROJECT).out $(SOURCES) |
|
|
$(CC) $(CFLAGS) -I./ -o binary/$(PROJECT).out $(SOURCES) |
|
|
|
|
|
|
|
|
program: binary/$(PROJECT).hex |
|
|
program: binary/$(PROJECT).hex |
|
|
avrdude -p m88 -c buspirate -P /dev/cu.PL2303-003012FA -e -U flash:w:binary/$(PROJECT).hex |
|
|
|
|
|
|
|
|
avrdude -p m88 -c buspirate -P /dev/cu.PL2303-00* -e -U flash:w:binary/$(PROJECT).hex |
|
|
|
|
|
|
|
|
clean: |
|
|
clean: |
|
|
rm -rf binary/ |
|
|
rm -rf binary/ |