9 ###############################################################################
12 SRC
+= cli.c cli_readline.c command.c command_tbl.c
13 SRC
+= cmd_run.c cmd_boot.c cmd_misc.c cmd_cpu.c
14 SRC
+= cmd_date.c cmd_mem.c cmd_gpio.c cmd_attach.c
15 SRC
+= cmd_loadihex.c cmd_loadcpm3.c cmd_sd.c cmd_fat.c
16 SRC
+= env.c con-utils.c print-utils.c getopt-min.c eval_arg.c
17 SRC
+= timer.c serial.c i2c.c bcd.c pcf8583.c mmc.c strerror.c
18 SRC
+= background.c z180-serv.c z80-if.c gpio.c disas_z180.c
20 FATFSDIR
:= ..
/fatfs
/source
21 FATFS
:= $(FATFSDIR
)/ff.c
$(FATFSDIR
)/ffunicode.c
23 SRC_Z
:= $(ZDIR
)/hdrom.c
$(ZDIR
)/cfboot.c
$(ZDIR
)/cpuinfo.c
25 # Sources that may depend on Z180 code:
26 Z_DEP
:= $(shell grep
-sl
'include[[:blank:]]\+"$(ZDIR)' $(SRC
))
31 #$(FATFS:%.c=%.o): CFLAGS += -fno-strict-aliasing
32 $(SRC_Z
:%.c
=%.o
): CFLAGS
+= -D
'const=const __flash'
35 # Place -D or -U options here
43 # Place -I options here
47 #TGT_CFLAGS += -funsigned-char
48 TGT_CFLAGS
+= -fno-move-loop-invariants
49 TGT_CFLAGS
+= -fno-tree-loop-optimize
50 #TGT_CFLAGS += -fno-split-wide-types
54 ###############################################################################
55 # Programming support using avrdude.
57 AVRDUDE_PROGRAMMER
:= dragon_isp
58 # Uncomment, if the programmer is /not/ on USB.
66 # 0x97 = 1 0 0 1 0 1 1 1
68 # | | | +------- CKSEL 3..0 (Low Power Crystal)
69 # | | +--------------- SUT 1..0 (Crystal Osc, slowly rising power)
70 # | +------------------ CKOUT (Clock output enabled)
71 # +-------------------- CKDIV8 (don't divide clock by 8)
73 # 0xd6 = 1 1 0 1 0 1 1 0
74 # ^ ^ ^ ^ ^ \+/ ^---- BOOTRST (Boot Reset vector Enabled 0x3c00)
75 # | | | | | +------- BOOTSZ 1..0 (Boot Flash section size 512 words)
76 # | | | | + --------- EESAVE (Preserve EEPROM over chip erase)
77 # | | | +-------------- WDTON (WDT not always on)
78 # | | +---------------- SPIEN (allow serial programming)
79 # | +------------------ JTAGEN (JTAG disabled)
80 # +-------------------- OCDEN (OCD disabled)
82 # 0xf5 = 1 1 1 1 0 1 0 1
84 # +------ Bodlevel (VCC = 2.7V)
86 # Uncomment the following if you do /not/ wish a verification to be
87 # performed after programming the device.
88 #AVRDUDE_NO_VERIFY = -V
90 # Increase verbosity level. Please use this when submitting bug
91 # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
92 # to submit bug reports.
93 #AVRDUDE_VERBOSE = -v -v
95 ###############################################################################
105 $(Z_DEP
:%.c
=%.o
): $(SRC_Z
)
108 $(MAKE
) -C
$(ZDIR
) $(@F
)
112 $(MAKE
) -C
$(ZDIR
) clean
114 include ..
/mk
/avr.rules.mk