git.ucc.asn.au
/
uccvend-snackrom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add credit, add 013 debug timer message on keypress
[uccvend-snackrom.git]
/
ROM2
/
Makefile
diff --git
a/ROM2/Makefile
b/ROM2/Makefile
index
ac77ee3
..
a832263
100644
(file)
--- a/
ROM2/Makefile
+++ b/
ROM2/Makefile
@@
-3,14
+3,15
@@
OBJS = \
motors.o keypad.o display_basic.o coinmech.o chime.o \
helpers.o main_basic.o sci.o \
OBJS = \
motors.o keypad.o display_basic.o coinmech.o chime.o \
helpers.o main_basic.o sci.o \
- vectors.o start.o romsrc.o xmodem.o
-INCLUDES = vend.h keypad.h chime.h asm.h display_basic.h ports.h types.h
+ vectors.o start.o romsrc.o xmodem.o
mic.o
+INCLUDES = vend.h keypad.h chime.h asm.h display_basic.h ports.h types.h
version.h
# debugging doesn't get compiled into the ROM image
CFLAGS = -m68hc11 -mshort -Wall -O1 \
-msoft-reg-count=0 -ffixed-z -g -fomit-frame-pointer
LDFLAGS = -m68hc11 -mshort -Wl,-m,m68hc11elfb \
-nostartfiles \
# debugging doesn't get compiled into the ROM image
CFLAGS = -m68hc11 -mshort -Wall -O1 \
-msoft-reg-count=0 -ffixed-z -g -fomit-frame-pointer
LDFLAGS = -m68hc11 -mshort -Wl,-m,m68hc11elfb \
-nostartfiles \
+ -Wl,-defsym,_nvram=0x0800 \
-Wl,-defsym,_io_ports=0x1000 \
-Wl,-defsym,_switch_input=0x1800 \
-Wl,-defsym,_misc_input=0x2000 \
-Wl,-defsym,_io_ports=0x1000 \
-Wl,-defsym,_switch_input=0x1800 \
-Wl,-defsym,_misc_input=0x2000 \
@@
-34,14
+35,18
@@
OBJCOPY = $(DEVC_PREFIX)objcopy
OBJDUMP = $(DEVC_PREFIX)objdump
LD = $(DEVC_PREFIX)ld
OBJDUMP = $(DEVC_PREFIX)objdump
LD = $(DEVC_PREFIX)ld
-all: rom2.b rom2.elf rom2.s19
+all: rom2.b rom2.elf rom2.s19
crctest
-rom2.elf: $(OBJS) memory.x
+rom2.elf: $(OBJS) memory.x
check-romsrc.pl
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBADD)
$(SIZE) $@
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBADD)
$(SIZE) $@
+ @perl -w check-romsrc.pl
clean:
clean:
- rm -f *.o *.elf *.s19 *.b *.a rom.tar.bz2 romsrc.c crctab.h m68hc11-gdb gencrctab
+ rm -f *.o *.elf *.s19 *.b *.a rom.tar.lz romsrc.s crctab.h version.h m68hc11-gdb gencrctab crctest
+
+crctest: crctest.c crctab.h
+ gcc -o $@ $<
#
# Some useful rules
#
# Some useful rules
@@
-52,28
+57,26
@@
dump: rom2.elf
size: rom2.s19
$(SIZE) $<
size: rom2.s19
$(SIZE) $<
-rom.tar.
bz2
:
- rm -f romsrc.
c
crctab.h
- tar c
jf rom.tar.bz2 README Makefile gdbsimrc *.pl *.c *.h *.s *.x
+rom.tar.
lz
:
+ rm -f romsrc.
s
crctab.h
+ tar c
README Makefile gdbsimrc *.pl *.c *.h *.s *.x | lzip -c -9 > $@
-romsrc.
c: rom.tar.bz2
- perl -w src2
c
.pl < $< > $@
+romsrc.
s: rom.tar.lz src2asm.pl
+ perl -w src2
asm
.pl < $< > $@
-
xmodem.c: crctab
.h
+
main_basic.c: version
.h
-gencrctab: gencrctab.c
- gcc -o $@ $<
+version.h: gen-version.pl
+ ./gen-version.pl > $@
+
+xmodem.c: crctab.h
crctab.h: gencrctab
./gencrctab > $@
crctab.h: gencrctab
./gencrctab > $@
-#
-# Implicit rules
-#
-# .elf is for the simulator and gdb
-# .s19 is for some downloader and the simulator
-# .b is a binary dump
-#
+gencrctab: gencrctab.c
+ gcc -o $@ $<
+
.SUFFIXES: .elf .s19 .b
.elf.s19:
.SUFFIXES: .elf .s19 .b
.elf.s19:
@@
-82,6
+85,7
@@
crctab.h: gencrctab
.elf.b:
$(OBJCOPY) --output-target=binary --gap-fill=255 \
$(OBJCOPY_FLAGS) $< $*.b
.elf.b:
$(OBJCOPY) --output-target=binary --gap-fill=255 \
$(OBJCOPY_FLAGS) $< $*.b
+ @perl -e '$$sum = 0;while(read STDIN, $$a, 1){$$sum += ord($$a); $$sum = $$sum&0xffff;} printf "Checksum is \%x\n", $$sum' < $@
m68hc11-gdb: /usr/bin/m68hc11-gdb
sed -e 's|m68hc11eepr/reg 0xb000 512|m68hc11eepr/reg 0x4000 1 |' < $< > $@
m68hc11-gdb: /usr/bin/m68hc11-gdb
sed -e 's|m68hc11eepr/reg 0xb000 512|m68hc11eepr/reg 0x4000 1 |' < $< > $@
UCC
git Repository :: git.ucc.asn.au