9 FATFSDIR
:= ..
/fatfs
/source
10 FATFS
:= $(FATFSDIR
)/ff.c
$(FATFSDIR
)/ffunicode.c
12 SRC_Z
:= ..
/z180
/hdrom.c ..
/z180
/cfboot.c ..
/z180
/cpuinfo.c
15 SRC
+= cli.c cli_readline.c command.c command_tbl.c
16 SRC
+= cmd_run.c cmd_boot.c cmd_misc.c cmd_cpu.c
17 SRC
+= cmd_date.c cmd_mem.c cmd_gpio.c cmd_attach.c
18 SRC
+= cmd_loadihex.c cmd_loadcpm3.c cmd_sd.c cmd_fat.c
19 SRC
+= env.c con-utils.c print-utils.c getopt-min.c eval_arg.c
20 SRC
+= timer.c serial.c i2c.c bcd.c pcf8583.c mmc.c strerror.c
21 SRC
+= background.c z180-serv.c z80-if.c gpio.c
25 #$(FATFS:%.c=%.o): CFLAGS += -fno-strict-aliasing
26 $(SRC_Z
:%.c
=%.o
): CFLAGS
+= -D
'const=const __flash'
29 # Place -D or -U options here
30 CDEFS
:= -DF_CPU
=$(F_CPU
)UL
32 ifeq ($(MCU
),atmega1281
)
33 CDEFS
+= -DMCU_STRING
=\"ATmega1281
\"
35 CDEFS
+= -DMCU_STRING
=\"ATmega2561
\"
43 # Place -I options here
47 CSTANDARD
= -std
=gnu11
49 CWARN
= -Wall
-Wextra
-Wstrict-prototypes
-Wredundant-decls
50 CTUNING
= -funsigned-char
-fshort-enums
-funsigned-bitfields
-fpack-struct
51 CTUNING
+= -mrelax
-fno-common
52 CTUNING
+= -fno-move-loop-invariants
53 CTUNING
+= -fno-tree-loop-optimize
54 #CTUNING += -fno-split-wide-types
55 CEXTRA
= -ffunction-sections
-fdata-sections
57 CFLAGS
= $(CDEBUG
) $(CDEFS
) $(CINCS
) -O
$(OPT
) $(CWARN
) $(CSTANDARD
) $(CEXTRA
) $(CTUNING
)
61 # Linker Options - Create mapfile with cross reference
62 LDFLAGS
:= -Wl
,-Map
=$(TARGET
).map
,--cref
63 LDFLAGS
+= -Wl
,--gc-sections
65 # Programming support using avrdude.
67 AVRDUDE_PROGRAMMER
:= dragon_isp
71 # Uncomment the following if you do /not/ wish a verification to be
72 # performed after programming the device.
73 #AVRDUDE_NO_VERIFY = -V
75 # Increase verbosity level. Please use this when submitting bug
76 # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
77 # to submit bug reports.
78 #AVRDUDE_VERBOSE = -v -v
85 # 0xda = 1 1 0 1 1 1 1 0 <-- BOOTRST (Boot Reset vector Enabled 0x3c00)
86 # ^ ^ ^ ^ ^ ^ ^------ BOOTSZ0
87 # | | | | | +-------- BOOTSZ1 (Boot Flash section size 256 words)
88 # | | | | + --------- EESAVE (don't preserve EEPROM over chip erase)
89 # | | | +-------------- WDTON (WDT not always on)
90 # | | +---------------- SPIEN (allow serial programming)
91 # | +------------------ DWEN (debugWIRE is not enabled)
92 # +-------------------- RSTDISBL (reset pin is enabled)
94 # 0x9f = 1 1 1 1 1 1 1 1
96 # | | | +------- CKSEL 3..0 (Low Power Crystal)
97 # | | +--------------- SUT 1..0 (Crystal Osc, slowly rising power)
98 # | +------------------ CKOUT (Clock output disabled)
99 # +-------------------- CKDIV8 (don't divide clock by 8)
100 # Fuse Extended byte:
101 # 0x9f = 1 1 1 1 1 1 0 1
103 # +------ Bodlevel (VCC = 2.7V)
111 include ..
/mk
/avr.rules.mk