X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=ROM2%2FMakefile;h=38780bfa9582d758ce4fdff80eb0ef8d8c5c8093;hb=dc87be12e6cb8428ab33c0984c5f871e6e1c5587;hp=17063d4da4c3a386f5fbdd0ad47d46c29100eac0;hpb=77e73f29dba77e76df09c5b93f61a446e1fd8714;p=uccvend-snackrom.git diff --git a/ROM2/Makefile b/ROM2/Makefile index 17063d4..38780bf 100644 --- a/ROM2/Makefile +++ b/ROM2/Makefile @@ -41,7 +41,7 @@ rom2.elf: $(OBJS) memory.x $(SIZE) $@ clean: - rm -f *.o *.elf *.s19 *.b *.a rom.tar.bz2 romsrc.c crctab.h + rm -f *.o *.elf *.s19 *.b *.a rom.tar.bz2 romsrc.s crctab.h m68hc11-gdb gencrctab # # Some useful rules @@ -53,11 +53,11 @@ size: rom2.s19 $(SIZE) $< rom.tar.bz2: - rm -f romsrc.c crctab.h - tar cjf rom.tar.bz2 README Makefile *.c *.h *.s *.x + rm -f romsrc.s crctab.h + tar cjf rom.tar.bz2 README Makefile gdbsimrc *.pl *.c *.h *.s *.x -romsrc.c: rom.tar.bz2 - perl -w src2c.pl < $< > $@ +romsrc.s: rom.tar.bz2 src2asm.pl + perl -w src2asm.pl < $< > $@ xmodem.c: crctab.h @@ -82,3 +82,11 @@ crctab.h: gencrctab .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 |' < $< > $@ + chmod 755 $@ + +sim: m68hc11-gdb rom2.elf + ./m68hc11-gdb -x gdbsimrc rom2.elf