From: kbongers Date: Sun, 3 Feb 2002 20:07:56 +0000 (+0000) Subject: add ucsim z80 test case X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=a782e0bd0c3d4a30c6b33dc317aeb07e62e7facf;p=fw%2Fsdcc add ucsim z80 test case git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1896 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/support/regression/ports/ucz80/spec.mk b/support/regression/ports/ucz80/spec.mk new file mode 100644 index 00000000..7a9c5728 --- /dev/null +++ b/support/regression/ports/ucz80/spec.mk @@ -0,0 +1,42 @@ +# Port specification for the xxxx port running with uCsim +# + +# path to uCsim +UCZ80 = $(SDCC_DIR)/bin/sz80 +#UCZ80 = $(SDCC_DIR)/bin/s51 + +SDCCFLAGS +=-mz80 --lesspedantic --profile -DREENTRANT= +#SDCCFLAGS +=--lesspedantic -DREENTRANT=reentrant --stack-after-data + +#OBJEXT = .o +EXEEXT = .ihx + +EXTRAS = fwk/lib/testfwk$(OBJEXT) $(PORTS_DIR)/$(PORT)/support$(OBJEXT) + +# Rule to link into .ihx +#%$(EXEEXT): %$(OBJEXT) $(EXTRAS) + +%$(EXEEXT): %.c $(EXTRAS) + $(SDCC) $(SDCCFLAGS) $< $(EXTRAS) +# mv fwk/lib/testfwk.ihx $@ +# mv fwk/lib/testfwk.map $(@:.ihx=.map) + +%$(OBJEXT): %.asm + $(SDCC_DIR)/bin/as-z80 -plosgff $@ $< + +%$(OBJEXT): %.c + $(SDCC) $(SDCCFLAGS) -c $< + +# run simulator with 10 seconds timeout +%.out: %$(EXEEXT) fwk/lib/timeout + mkdir -p `dirname $@` + -fwk/lib/timeout 10 $(UCZ80) -t32 $< < $(PORTS_DIR)/$(PORT)/uCsim.cmd > $@ \ + || echo -e --- FAIL: \"timeout, simulation killed\" in $(<:.ihx=.c)"\n"--- Summary: 1/1/1: timeout >> $@ + -grep -n FAIL $@ /dev/null || true + +fwk/lib/timeout: fwk/lib/timeout.c + +_clean: + rm -f fwk/lib/timeout fwk/lib/timeout.exe $(PORTS_DIR)/$(PORT)/*.rel $(PORTS_DIR)/$(PORT)/*.rst \ + $(PORTS_DIR)/$(PORT)/*.lst $(PORTS_DIR)/$(PORT)/*.sym $(PORTS_DIR)/$(PORT)/*.asm temp.lnk + diff --git a/support/regression/ports/ucz80/support.asm b/support/regression/ports/ucz80/support.asm new file mode 100644 index 00000000..01e0ef8b --- /dev/null +++ b/support/regression/ports/ucz80/support.asm @@ -0,0 +1,9 @@ + .area _CODE + .globl _putchar + .globl _exit + +__putchar:: + jp _putchar + +__exitEmu:: + jp _exit diff --git a/support/regression/ports/ucz80/uCsim.cmd b/support/regression/ports/ucz80/uCsim.cmd new file mode 100755 index 00000000..58afc787 --- /dev/null +++ b/support/regression/ports/ucz80/uCsim.cmd @@ -0,0 +1,2 @@ +run +quit