From a9f771662ac72696e35dc9aa19c95d84c39eb6d7 Mon Sep 17 00:00:00 2001 From: epetrich Date: Wed, 15 Oct 2003 06:13:11 +0000 Subject: [PATCH] Initial import git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2943 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- support/regression/ports/hc08/spec.mk | 41 +++++++++++++++++++++++++ support/regression/ports/hc08/support.c | 16 ++++++++++ support/regression/ports/hc08/uCsim.cmd | 2 ++ 3 files changed, 59 insertions(+) create mode 100644 support/regression/ports/hc08/spec.mk create mode 100644 support/regression/ports/hc08/support.c create mode 100644 support/regression/ports/hc08/uCsim.cmd diff --git a/support/regression/ports/hc08/spec.mk b/support/regression/ports/hc08/spec.mk new file mode 100644 index 00000000..8a3be0a4 --- /dev/null +++ b/support/regression/ports/hc08/spec.mk @@ -0,0 +1,41 @@ +# Port specification for the xxxx port running with uCsim +# + +# path to uCsim +UCHC08 = $(SDCC_DIR)/bin/shc08 + +SDCCFLAGS +=-mhc08 --less-pedantic --out-fmt-ihx -DREENTRANT= +#SDCCFLAGS +=--less-pedantic -DREENTRANT=reentrant + +OBJEXT = .rel +EXEEXT = .ihx + +EXTRAS = $(PORTS_DIR)/$(PORT)/testfwk$(OBJEXT) $(PORTS_DIR)/$(PORT)/support$(OBJEXT) + +# Rule to link into .ihx +#%$(EXEEXT): %$(OBJEXT) $(EXTRAS) + +%$(EXEEXT): %.c $(EXTRAS) + $(SDCC) $(SDCCFLAGS) $< $(EXTRAS) -o $@ + +%$(OBJEXT): %.asm + $(SDCC_DIR)/bin/as-hc08 -plosgff $< + +%$(OBJEXT): %.c + $(SDCC) $(SDCCFLAGS) -c $< -o $@ + +$(PORTS_DIR)/$(PORT)/%$(OBJEXT): fwk/lib/%.c + $(SDCC) $(SDCCFLAGS) -c $< -o $@ + +# run simulator with 10 seconds timeout +%.out: %$(EXEEXT) fwk/lib/timeout + mkdir -p `dirname $@` + -fwk/lib/timeout 10 $(UCHC08) -t32 $< < $(PORTS_DIR)/$(PORT)/uCsim.cmd > $@ \ + || echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@ + -grep -n FAIL $@ /dev/null || true + +fwk/lib/timeout: fwk/lib/timeout.c + +_clean: + rm -f ports/$(PORT)/testfwk.asm ports/$(PORT)/*.lst ports/$(PORT)/*.rel ports/$(PORT)/*.sym + diff --git a/support/regression/ports/hc08/support.c b/support/regression/ports/hc08/support.c new file mode 100644 index 00000000..3a847d43 --- /dev/null +++ b/support/regression/ports/hc08/support.c @@ -0,0 +1,16 @@ + +void +_putchar(unsigned char c) +{ + _asm + .db 0x9e, 0xed + _endasm; +} + +void +_exitEmu(void) +{ + _asm + .db 0x9e, 0xec + _endasm; +} diff --git a/support/regression/ports/hc08/uCsim.cmd b/support/regression/ports/hc08/uCsim.cmd new file mode 100644 index 00000000..58afc787 --- /dev/null +++ b/support/regression/ports/hc08/uCsim.cmd @@ -0,0 +1,2 @@ +run +quit -- 2.30.2