PROJECT = Kalender
DEVICE = atmega328p
F_CPU = 16000000
#Auswahl des Shields
#ITDB02 = Frank Philippczyks allererstes Shield mit 75 mm Diagonale, lichtschwach (okay)
#SHIELD = ITDB02
#SHIELD = MCUFRIEND24
#TFT24 = 2,4" TFT LCD SHIELD
SHIELD = TFT24
#SHIELD = LMS241GF31
#SHIELD = TFT28R3
#Lutz Auerswald: 2,4" TFT LCD SHIELD mit ILI9341 und TouchScreen2.cpp
CL = avr-gcc -Wall -Wno-parentheses -Os -fno-move-loop-invariants -ffunction-sections
CL+= -Wl,-gc-sections -mno-interrupts -mrelax -mmcu=$(DEVICE)
CL+= -D SHIELD_$(SHIELD) -D F_CPU=$(F_CPU)
PGMR = avrdude -c arduino -p $(DEVICE) -P com4
FUSE = 0x59
all: $(PROJECT).hex $(PROJECT).lst
$(PROJECT).hex: $(PROJECT).elf
avr-size -C --mcu=$(DEVICE) $<
avr-objcopy -j .text -j .data -O ihex $< $@
avr-objcopy -j .eeprom --change-section-lma .eeprom=0 -O ihex $< $(PROJECT).eep
$(PROJECT).lst: $(PROJECT).elf
avr-objdump -dt $< > $@
Kalender.o: Kalender.cpp utft.h utft-config.h Makefile
$(CL) -c -o $@ $<
# -D EELOAD
utft.o: utft.cpp utft.h utft-config.h
$(CL) -c -o $@ $<
#DefaultFonts.o: DefaultFonts.c
# $(CL) -c -o $@ $<
ArialBP19.o: ArialBP19.c
$(CL) -c -o $@ $<
ArialBP24.o: ArialBP24.c
$(CL) -c -o $@ $<
calib.o: calib.cpp
$(CL) -c -o $@ $<
stellen.o: stellen.cpp
$(CL) -c -o $@ $<
kal.o: kal.cpp
$(CL) -c -o $@ $<
ifeq ($(SHIELD),ITDB02)
TouchScreen.o: TouchScreen0.cpp TouchScreen.h
endif
ifeq ($(SHIELD),MCUFRIEND24)
TouchScreen.o: TouchScreen4.cpp TouchScreen.h
endif
ifeq ($(SHIELD),TFT28R3)
TouchScreen.o: TouchScreen1.cpp TouchScreen.h
endif
ifeq ($(SHIELD),TFT24)
TouchScreen.o: TouchScreen3.cpp TouchScreen.h
endif
ifeq ($(SHIELD),LMS241GF31)
TouchScreen.o: TouchScreen2.cpp TouchScreen.h
endif
$(CL) -c -o $@ $<
$(PROJECT).elf: Kalender.o utft.o ArialBP19.o ArialBP24.o TouchScreen.o calib.o stellen.o kal.o
$(CL) -o $@ $^ -lc -lm
flash: $(PROJECT).hex
$(PGMR) -V -U flash:w:$<
#-U eeprom:w:$(PROJECT).eep
# $@ = Ziel
# $< = Quelle (1. Datei)
# $^ = alle Quellen
#flash: $(PROJECT).hex
# $(AVRDUDE) -U flash:w:$<:i
Vorgefundene Kodierung: UTF-8 | 0
|