* support/regression/Makefile.in,
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 28 Oct 2007 14:45:55 +0000 (14:45 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 28 Oct 2007 14:45:55 +0000 (14:45 +0000)
  support/regression/ports/mcs51-large/spec.mk,
  support/regression/ports/mcs51-xstack-auto/spec.mk,
  support/regression/ports/mcs51-stack-auto/spec.mk,
  support/regression/ports/mcs51-medium/spec.mk,
  support/regression/ports/mcs51-common/spec.mk,
  support/regression/ports/mcs51-common/*,
  support/regression/ports/mcs51-small/*:
  mcs51 renamed to mcs51-common, created mcs51-small

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4945 4a8a32a2-be11-0410-ad9d-d568d2c75423

17 files changed:
ChangeLog
support/regression/Makefile.in
support/regression/ports/mcs51-common/T2_isr.c [new file with mode: 0644]
support/regression/ports/mcs51-common/fwk.lib [new file with mode: 0644]
support/regression/ports/mcs51-common/spec.mk [new file with mode: 0644]
support/regression/ports/mcs51-common/support.c [new file with mode: 0644]
support/regression/ports/mcs51-common/uCsim.cmd [new file with mode: 0644]
support/regression/ports/mcs51-large/spec.mk
support/regression/ports/mcs51-medium/spec.mk
support/regression/ports/mcs51-small/spec.mk [new file with mode: 0644]
support/regression/ports/mcs51-stack-auto/spec.mk
support/regression/ports/mcs51-xstack-auto/spec.mk
support/regression/ports/mcs51/T2_isr.c [deleted file]
support/regression/ports/mcs51/fwk.lib [deleted file]
support/regression/ports/mcs51/spec.mk [deleted file]
support/regression/ports/mcs51/support.c [deleted file]
support/regression/ports/mcs51/uCsim.cmd [deleted file]

index 70b5d09acf09b109b0257035acf00b9b132a8125..9076edc2a619d550ceddd70e02db0758c31c96a3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2007-10-28 Borut Razem <borut.razem AT siol.net>
+
+       * support/regression/Makefile.in,
+         support/regression/ports/mcs51-large/spec.mk,
+         support/regression/ports/mcs51-xstack-auto/spec.mk,
+         support/regression/ports/mcs51-stack-auto/spec.mk,
+         support/regression/ports/mcs51-medium/spec.mk,
+         support/regression/ports/mcs51-common/spec.mk,
+         support/regression/ports/mcs51-common/*,
+         support/regression/ports/mcs51-small/*:
+         mcs51 renamed to mcs51-common, created mcs51-small
+
 2007-10-26 Maarten Brock <sourceforge.brock AT dse.nl>
 
        * src/mcs51/peeph.def: moved rules 257.x to 253.x and re-enabled 253.b,
index 4bedab0c0067588bc49663a8d246bccfa311fb42..08a1c0eefee0806c06fe0c0b6e7afcbf0089e579 100644 (file)
@@ -69,10 +69,10 @@ GENERATE_CASES = $(srcdir)/generate-cases.py
 # Each directory under ports/ is used as a port name.  Each port is tested.
 # Each port must have a spec.mk which describes how to build the object
 # files and how to run the emulator.
-ALL_PORTS = $(filter-out .svn xa51 z80 gbz80 pic16 pic14,$(notdir $(wildcard $(PORTS_DIR)/*)))
+ALL_PORTS = $(filter-out .svn xa51 z80 gbz80 pic16 pic14 mcs51-common,$(notdir $(wildcard $(PORTS_DIR)/*)))
 
 # These  ports will be cleaned with 'make clean'
-CLEAN_PORTS = $(filter-out .svn,$(notdir $(wildcard $(PORTS_DIR)/*)))
+CLEAN_PORTS = $(filter-out .svn mcs51-common,$(notdir $(wildcard $(PORTS_DIR)/*)))
 
 MAKE_LIBRARY =
 
@@ -94,7 +94,7 @@ test-gbz80:
 test-mcs51: test-mcs51-small test-mcs51-medium test-mcs51-large test-mcs51-stack-auto test-mcs51-xstack-auto
 
 test-mcs51-small:
-       $(MAKE) test-port PORT=mcs51
+       $(MAKE) test-port PORT=mcs51-small
 
 test-mcs51-medium:
        $(MAKE) test-port PORT=mcs51-medium
diff --git a/support/regression/ports/mcs51-common/T2_isr.c b/support/regression/ports/mcs51-common/T2_isr.c
new file mode 100644 (file)
index 0000000..2a248d1
--- /dev/null
@@ -0,0 +1,6 @@
+//dummy interrupt service routine
+//just to make linker happy
+
+void T2_isr (void) interrupt 5
+{
+}
diff --git a/support/regression/ports/mcs51-common/fwk.lib b/support/regression/ports/mcs51-common/fwk.lib
new file mode 100644 (file)
index 0000000..c6898f8
--- /dev/null
@@ -0,0 +1 @@
+T2_isr.rel
diff --git a/support/regression/ports/mcs51-common/spec.mk b/support/regression/ports/mcs51-common/spec.mk
new file mode 100644 (file)
index 0000000..14aeffd
--- /dev/null
@@ -0,0 +1,51 @@
+# Common specification for the mcs51 ports running with uCsim
+
+ifndef DEV_NULL
+  DEV_NULL = /dev/null
+endif
+
+# path to uCsim
+S51A = $(top_builddir)/sim/ucsim/s51.src/s51
+S51B = $(top_builddir)/bin/s51
+
+S51 = $(shell if [ -f $(S51A) ]; then echo $(S51A); else echo $(S51B); fi)
+
+SDCCFLAGS +=--nostdinc --less-pedantic -DREENTRANT=reentrant -I$(INC_DIR)/mcs51 -I$(top_srcdir)
+LINKFLAGS = --nostdlib
+LINKFLAGS += mcs51.lib libsdcc.lib liblong.lib libint.lib libfloat.lib
+
+OBJEXT = .rel
+EXEEXT = .ihx
+
+EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
+FWKLIB = $(PORT_CASES_DIR)/T2_isr$(OBJEXT)
+
+# Rule to link into .ihx
+%$(EXEEXT): %$(OBJEXT) $(EXTRAS) $(FWKLIB) $(PORT_CASES_DIR)/fwk.lib
+       $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $(PORT_CASES_DIR)/fwk.lib $< -o $@
+
+%$(OBJEXT): %.c
+       $(SDCC) $(SDCCFLAGS) -c $< -o $@
+
+$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/mcs51-common/%.c
+       $(SDCC) $(SDCCFLAGS) -c $< -o $@
+
+$(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c
+       $(SDCC) $(SDCCFLAGS) -c $< -o $@
+
+$(PORT_CASES_DIR)/fwk.lib:
+       cp $(PORTS_DIR)/mcs51-common/fwk.lib $@
+
+# run simulator with 30 seconds timeout
+%.out: %$(EXEEXT) gen/timeout
+       mkdir -p $(dir $@)
+       -gen/timeout 30 "$(S51)" -t32 -S in=$(DEV_NULL),out=$@ $< < $(PORTS_DIR)/mcs51-common/uCsim.cmd > $(@:.out=.sim) \
+         || echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@
+       python $(srcdir)/get_ticks.py < $(@:.out=.sim) >> $@
+       -grep -n FAIL $@ /dev/null || true
+
+
+gen/timeout: $(srcdir)/fwk/lib/timeout.c
+       $(CC) $< -o $@
+
+_clean:
diff --git a/support/regression/ports/mcs51-common/support.c b/support/regression/ports/mcs51-common/support.c
new file mode 100644 (file)
index 0000000..9edef19
--- /dev/null
@@ -0,0 +1,33 @@
+// #define MICROCONTROLLER_8051
+#include <mcs51reg.h>
+
+unsigned char
+_sdcc_external_startup (void)
+{
+  /* serial port mode 0 is default */
+  /* enable transmission of first byte */
+  TI = 1;
+  return 0;
+}
+
+void
+_putchar (char c)
+{
+  while (!TI)
+    ;
+  TI = 0;
+  SBUF = c;
+}
+
+void
+_initEmu (void)
+{
+}
+
+void
+_exitEmu (void)
+{
+  while (!TI) /* wait for the last character to be transmitted */
+    ;         /* before hitting the breakpoint */
+  * (char idata *) 0 = * (char xdata *) 0x7654;
+}
diff --git a/support/regression/ports/mcs51-common/uCsim.cmd b/support/regression/ports/mcs51-common/uCsim.cmd
new file mode 100644 (file)
index 0000000..cd2b168
--- /dev/null
@@ -0,0 +1,8 @@
+set error non-classified off
+set error unknown_code off
+set error memory off
+set error stack off
+break xram r 0x7654
+run
+state
+quit
index e7353466d460cce546a2b843b8061fb68f68b9c5..e919a49e134acf00c60dce090723d165f37e04af 100644 (file)
@@ -1,13 +1,9 @@
-# Port specification for the mcs51 port running with uCsim
+# Port specification for the mcs51-large port running with uCsim
 #
 # model large
 
 SDCCFLAGS +=--model-large
 
-include $(PORTS_DIR)/mcs51/spec.mk
-
-# use C sources from mcs51
-$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/mcs51/%.c
-       $(SDCC) $(SDCCFLAGS) -c $< -o $@
+include $(PORTS_DIR)/mcs51-common/spec.mk
 
 LIBDIR = $(top_builddir)/device/lib/build/large
index 5fdd15935505daa7c24eed823dd6754966273756..a6014ab7f981ba754beeda507065be359286b043 100644 (file)
@@ -1,13 +1,9 @@
-# Port specification for the mcs51 port running with uCsim
+# Port specification for the mcs51-medium port running with uCsim
 #
 # model medium
 
 SDCCFLAGS +=--model-medium
 
-include $(PORTS_DIR)/mcs51/spec.mk
-
-# use C sources from mcs51
-$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/mcs51/%.c
-       $(SDCC) $(SDCCFLAGS) -c $< -o $@
+include $(PORTS_DIR)/mcs51-common/spec.mk
 
 LIBDIR = $(top_builddir)/device/lib/build/medium
diff --git a/support/regression/ports/mcs51-small/spec.mk b/support/regression/ports/mcs51-small/spec.mk
new file mode 100644 (file)
index 0000000..58a0616
--- /dev/null
@@ -0,0 +1,9 @@
+# Port specification for the mcs51 port running with uCsim
+#
+# model small
+
+SDCCFLAGS +=--model-small
+
+include $(PORTS_DIR)/mcs51-common/spec.mk
+
+LIBDIR = $(top_builddir)/device/lib/build/small
index 9025a9b4eabf4650da66fbf65cdbda6035bf560c..4727dccdf641099c3fff5dbdebacd9d6adf5b123 100644 (file)
@@ -1,13 +1,9 @@
-# Port specification for the mcs51 port running with uCsim
+# Port specification for the mcs51-stack-auto port running with uCsim
 #
 # model small stack-auto
 
 SDCCFLAGS +=--stack-auto
 
-include $(PORTS_DIR)/mcs51/spec.mk
-
-# use C sources from mcs51
-$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/mcs51/%.c
-       $(SDCC) $(SDCCFLAGS) -c $< -o $@
+include $(PORTS_DIR)/mcs51-common/spec.mk
 
 LIBDIR = $(top_builddir)/device/lib/build/small-stack-auto
index 16fcc2df0a21f55e8ebcc0c30b707163f4c32986..ca07c46a9c204c65032544f09de08053d23b485c 100644 (file)
@@ -1,8 +1,8 @@
-# Port specification for the mcs51 port running with uCsim
+# Port specification for the mcs51-xstack-auto port running with uCsim
 #
 # model small xstack-auto
 
-include $(PORTS_DIR)/mcs51/spec.mk
+include $(PORTS_DIR)/mcs51-common/spec.mk
 
 LIBSRCDIR   = $(top_srcdir)/device/lib
 LIBBUILDDIR = $(top_builddir)/device/lib
@@ -11,10 +11,6 @@ LIBDIR      = $(PORT_CASES_DIR)/lib
 LIBSDCCFLAGS+= --stack-auto --xstack --std-c99
 SDCCFLAGS   += --stack-auto --xstack --std-sdcc99
 
-# use C sources from mcs51
-$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/mcs51/%.c
-       $(SDCC) $(SDCCFLAGS) -c $< -o $@
-
 SOURCES = _atoi.c _atol.c _autobaud.c _bp.c _schar2fs.c \
           _decdptr.c _divsint.c _divslong.c _divuint.c \
           _divulong.c _fs2schar.c _fs2sint.c _fs2slong.c \
diff --git a/support/regression/ports/mcs51/T2_isr.c b/support/regression/ports/mcs51/T2_isr.c
deleted file mode 100644 (file)
index 2a248d1..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-//dummy interrupt service routine
-//just to make linker happy
-
-void T2_isr (void) interrupt 5
-{
-}
diff --git a/support/regression/ports/mcs51/fwk.lib b/support/regression/ports/mcs51/fwk.lib
deleted file mode 100644 (file)
index c6898f8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-T2_isr.rel
diff --git a/support/regression/ports/mcs51/spec.mk b/support/regression/ports/mcs51/spec.mk
deleted file mode 100644 (file)
index 4d3ebf3..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-# Port specification for the mcs51 port running with uCsim
-#
-# model small
-
-ifndef DEV_NULL
-  DEV_NULL = /dev/null
-endif
-
-# path to uCsim
-S51A = $(top_builddir)/sim/ucsim/s51.src/s51
-S51B = $(top_builddir)/bin/s51
-
-S51 = $(shell if [ -f $(S51A) ]; then echo $(S51A); else echo $(S51B); fi)
-
-SDCCFLAGS +=--nostdinc --less-pedantic -DREENTRANT=reentrant -I$(INC_DIR)/mcs51 -I$(top_srcdir)
-LINKFLAGS = --nostdlib
-LINKFLAGS += mcs51.lib libsdcc.lib liblong.lib libint.lib libfloat.lib
-LIBDIR = $(top_builddir)/device/lib/build/small
-
-OBJEXT = .rel
-EXEEXT = .ihx
-
-EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
-FWKLIB = $(PORT_CASES_DIR)/T2_isr$(OBJEXT)
-
-# Rule to link into .ihx
-%$(EXEEXT): %$(OBJEXT) $(EXTRAS) $(FWKLIB) $(PORT_CASES_DIR)/fwk.lib
-       $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $(PORT_CASES_DIR)/fwk.lib $< -o $@
-
-%$(OBJEXT): %.c
-       $(SDCC) $(SDCCFLAGS) -c $< -o $@
-
-$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.c
-       $(SDCC) $(SDCCFLAGS) -c $< -o $@
-
-$(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c
-       $(SDCC) $(SDCCFLAGS) -c $< -o $@
-
-$(PORT_CASES_DIR)/fwk.lib:
-       cp $(PORTS_DIR)/mcs51/fwk.lib $@
-
-# run simulator with 30 seconds timeout
-%.out: %$(EXEEXT) gen/timeout
-       mkdir -p $(dir $@)
-       -gen/timeout 30 "$(S51)" -t32 -S in=$(DEV_NULL),out=$@ $< < $(PORTS_DIR)/mcs51/uCsim.cmd > $(@:.out=.sim) \
-         || echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@
-       python $(srcdir)/get_ticks.py < $(@:.out=.sim) >> $@
-       -grep -n FAIL $@ /dev/null || true
-
-
-gen/timeout: $(srcdir)/fwk/lib/timeout.c
-       $(CC) $< -o $@
-
-_clean:
diff --git a/support/regression/ports/mcs51/support.c b/support/regression/ports/mcs51/support.c
deleted file mode 100644 (file)
index 9edef19..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-// #define MICROCONTROLLER_8051
-#include <mcs51reg.h>
-
-unsigned char
-_sdcc_external_startup (void)
-{
-  /* serial port mode 0 is default */
-  /* enable transmission of first byte */
-  TI = 1;
-  return 0;
-}
-
-void
-_putchar (char c)
-{
-  while (!TI)
-    ;
-  TI = 0;
-  SBUF = c;
-}
-
-void
-_initEmu (void)
-{
-}
-
-void
-_exitEmu (void)
-{
-  while (!TI) /* wait for the last character to be transmitted */
-    ;         /* before hitting the breakpoint */
-  * (char idata *) 0 = * (char xdata *) 0x7654;
-}
diff --git a/support/regression/ports/mcs51/uCsim.cmd b/support/regression/ports/mcs51/uCsim.cmd
deleted file mode 100644 (file)
index cd2b168..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-set error non-classified off
-set error unknown_code off
-set error memory off
-set error stack off
-break xram r 0x7654
-run
-state
-quit