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)
14 # Place -D or -U options here
15 CDEFS
= -DF_CPU
=$(F_CPU
) -DBAUD
=$(BAUD
) -D
$(MCU
) -DDRAM_DQ_ORDER
=$(DRAM_DQ_ORDER
)
17 WINEPATH
= C
:/Programme
/Atmel
/AVR\ Tools
/AvrAssembler2
18 DEFS
= $(WINEPATH
)/Appnotes
20 AS
= wine
$(WINEPATH
)/avrasm2.exe
21 ASFLAGS
= -I
$(DEFS
) $(CDEFS
)
23 # Programming support using avrdude. Settings and variables.
25 AVRDUDE_PROGRAMMER
= dragon_isp
28 AVRDUDE_WRITE_FLASH
= -U flash
:w
:$(TARGET
).hex
29 AVRDUDE_WRITE_EEPROM
= -U eeprom
:w
:$(TARGET
).eep
32 # Uncomment the following if you want avrdude's erase cycle counter.
33 # Note that this counter needs to be initialized first using -Yn,
35 #AVRDUDE_ERASE_COUNTER = -y
37 # Uncomment the following if you do /not/ wish a verification to be
38 # performed after programming the device.
39 #AVRDUDE_NO_VERIFY = -V
41 # Increase verbosity level. Please use this when submitting bug
42 # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
43 # to submit bug reports.
44 #AVRDUDE_VERBOSE = -v -v
46 AVRDUDE_BASIC
= -p
$(MCU
) -P
$(AVRDUDE_PORT
) -c
$(AVRDUDE_PROGRAMMER
)
47 AVRDUDE_FLAGS
= $(AVRDUDE_BASIC
) $(AVRDUDE_NO_VERIFY
) $(AVRDUDE_VERBOSE
) $(AVRDUDE_ERASE_COUNTER
)
54 # Define all listing files.
55 LST
= $(ASRC
:.asm
=.lst
)
57 # Combine all necessary flags and optional flags.
58 # Add target processor to flags.
59 ALL_ASFLAGS
= $(ASFLAGS
)
71 program
: $(TARGET
).hex
$(TARGET
).eep
72 $(AVRDUDE
) $(AVRDUDE_FLAGS
) $(AVRDUDE_WRITE_FLASH
) $(AVRDUDE_WRITE_EEPROM
)
75 $(AVRDUDE
) $(AVRDUDE_FLAGS
) $(AVRDUDE_WRITE_FLASH
)
77 eeprom
: $(TARGET
).hex
$(TARGET
).eep
78 $(AVRDUDE
) $(AVRDUDE_FLAGS
) $(AVRDUDE_WRITE_EEPROM
)
82 .SUFFIXES
: .hex .eep .lst
85 $(AS
) $(ALL_ASFLAGS
) -fI
-o
$@
$<
88 @
$(AS
) $(ALL_ASFLAGS
) -v0
-f-
-l
$@
$<
91 $(AS
) $(ALL_ASFLAGS
) -v0
-f-
-m
$@
$<
98 # Target: clean project.
100 $(REMOVE
) $(TARGET
).hex
$(TARGET
).eep
$(TARGET
).obj
$(TARGET
).map
$(TARGET
).lst
103 .PHONY
: all hex eep lst map program flash eeprom
tags clean