+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,
# 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 =
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
--- /dev/null
+//dummy interrupt service routine
+//just to make linker happy
+
+void T2_isr (void) interrupt 5
+{
+}
--- /dev/null
+T2_isr.rel
--- /dev/null
+# 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:
--- /dev/null
+// #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;
+}
--- /dev/null
+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
-# 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
-# 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
--- /dev/null
+# 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
-# 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
-# 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
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 \
+++ /dev/null
-//dummy interrupt service routine
-//just to make linker happy
-
-void T2_isr (void) interrupt 5
-{
-}
+++ /dev/null
-T2_isr.rel
+++ /dev/null
-# 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:
+++ /dev/null
-// #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;
-}
+++ /dev/null
-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