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
Put a useful filename there.
[uccvend-snackrom.git]
/
ROM2
/
Makefile
diff --git
a/ROM2/Makefile
b/ROM2/Makefile
index
672ee38
..
a126cf8
100644
(file)
--- a/
ROM2/Makefile
+++ b/
ROM2/Makefile
@@
-2,12
+2,12
@@
OBJS = \
motors.o keypad.o display_basic.o coinmech.o chime.o \
OBJS = \
motors.o keypad.o display_basic.o coinmech.o chime.o \
- helpers.o main_basic.o
comm
.o \
- vectors.o start.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
INCLUDES = vend.h keypad.h chime.h asm.h display_basic.h ports.h types.h
-
-CFLAGS = -
O3 -m68hc11 -mshort -Wall -Os -g0
\
- -msoft-reg-count=0 -ffixed-z
+# 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 \
LDFLAGS = -m68hc11 -mshort -Wl,-m,m68hc11elfb \
-nostartfiles \
@@
-38,9
+38,10
@@
all: rom2.b rom2.elf rom2.s19
rom2.elf: $(OBJS) memory.x
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBADD)
rom2.elf: $(OBJS) memory.x
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBADD)
+ $(SIZE) $@
clean:
clean:
- rm -f *.o *.elf *.s19 *.b *.a
+ rm -f *.o *.elf *.s19 *.b *.a
rom.tar.bz2 romsrc.c crctab.h m68hc11-gdb
#
# Some useful rules
#
# Some useful rules
@@
-51,6
+52,20
@@
dump: rom2.elf
size: rom2.s19
$(SIZE) $<
size: rom2.s19
$(SIZE) $<
+rom.tar.bz2:
+ rm -f romsrc.c crctab.h
+ tar cjf rom.tar.bz2 README Makefile gdbsimrc *.c *.h *.s *.x
+
+romsrc.c: rom.tar.bz2
+ perl -w src2c.pl < $< > $@
+
+xmodem.c: crctab.h
+
+gencrctab: gencrctab.c
+ gcc -o $@ $<
+
+crctab.h: gencrctab
+ ./gencrctab > $@
#
# Implicit rules
#
# Implicit rules
@@
-66,5
+81,11
@@
size: rom2.s19
.elf.b:
$(OBJCOPY) --output-target=binary --gap-fill=255 \
.elf.b:
$(OBJCOPY) --output-target=binary --gap-fill=255 \
- --only-section=.data $(OBJCOPY_FLAGS) $< $*.b
-
+ $(OBJCOPY_FLAGS) $< $*.b
+
+m68hc11-gdb: /usr/bin/m68hc11-gdb
+ sed -e 's|m68hc11eepr/reg 0xb000 512|m68hc11eepr/reg 0x4000 1 |' < $< > $@
+ chmod 755 $@
+
+sim: m68hc11-gdb rom2.elf
+ ./m68hc11-gdb -x gdbsimrc rom2.elf
UCC
git Repository :: git.ucc.asn.au