1 # AVR-ASM Makefile, derived from the WinAVR template (which
2 # is public domain), believed to be neutral to any flavor of "make"
3 # (GNU make, BSD make, SysV make)
15 # Place -D or -U options here
16 CDEFS
= -DF_CPU
=$(F_CPU
) -DBAUD
=$(BAUD
) -D
$(MCU
) -DDRAM_DQ_ORDER
=$(DRAM_DQ_ORDER
)
18 WINEPATH
= C
:/Programme
/Atmel
/AVR\ Tools
/AvrAssembler2
19 DEFS
= $(WINEPATH
)/Appnotes
21 AS
= wine
$(WINEPATH
)/avrasm2.exe
22 ASFLAGS
= -I
$(DEFS
) $(CDEFS
)
24 # Programming support using avrdude. Settings and variables.
26 AVRDUDE_PROGRAMMER
= dragon_isp
29 AVRDUDE_WRITE_FLASH
= -U flash
:w
:$(TARGET
).hex
30 AVRDUDE_WRITE_EEPROM
= -U eeprom
:w
:$(TARGET
).eep
33 # Uncomment the following if you want avrdude's erase cycle counter.
34 # Note that this counter needs to be initialized first using -Yn,
36 #AVRDUDE_ERASE_COUNTER = -y
38 # Uncomment the following if you do /not/ wish a verification to be
39 # performed after programming the device.
40 #AVRDUDE_NO_VERIFY = -V
42 # Increase verbosity level. Please use this when submitting bug
43 # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
44 # to submit bug reports.
45 #AVRDUDE_VERBOSE = -v -v
47 AVRDUDE_BASIC
= -p
$(MCU
) -P
$(AVRDUDE_PORT
) -c
$(AVRDUDE_PROGRAMMER
)
48 AVRDUDE_FLAGS
= $(AVRDUDE_BASIC
) $(AVRDUDE_NO_VERIFY
) $(AVRDUDE_VERBOSE
) $(AVRDUDE_ERASE_COUNTER
)
55 # Define all listing files.
56 LST
= $(ASRC
:.asm
=.lst
)
58 # Combine all necessary flags and optional flags.
59 # Add target processor to flags.
60 ALL_ASFLAGS
= $(ASFLAGS
)
72 program
: $(TARGET
).hex
$(TARGET
).eep
73 $(AVRDUDE
) $(AVRDUDE_FLAGS
) $(AVRDUDE_WRITE_FLASH
) $(AVRDUDE_WRITE_EEPROM
)
76 $(AVRDUDE
) $(AVRDUDE_FLAGS
) $(AVRDUDE_WRITE_FLASH
)
78 eeprom
: $(TARGET
).hex
$(TARGET
).eep
79 $(AVRDUDE
) $(AVRDUDE_FLAGS
) $(AVRDUDE_WRITE_EEPROM
)
83 .SUFFIXES
: .hex .eep .lst
86 $(AS
) $(ALL_ASFLAGS
) -fI
-o
$@
$<
89 @
$(AS
) $(ALL_ASFLAGS
) -v0
-f-
-l
$@
$<
92 $(AS
) $(ALL_ASFLAGS
) -v0
-f-
-m
$@
$<
99 # Target: clean project.
101 $(REMOVE
) $(TARGET
).hex
$(TARGET
).eep
$(TARGET
).obj
$(TARGET
).map
$(TARGET
).lst
104 .PHONY
: all hex eep lst map program flash eeprom
tags clean