+2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
+
+ * device/lib/Makefile.in: fixed to enable port-specific-objects
+ * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
+ char, thanks Hubert Sack
+ * doc/sdccman.lyx: documented --xstack-loc,
+ elaborated a bit more on interrupts and pitfalls,
+ removed "setjmp/longjmp unsupported",
+ documented some unsupported C99 features
+ * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
+ * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
+ if, thanks Hubert Sack
+ * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
+ * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
+ make make_library
+ * support/regression/get_ticks.py: new, get cpu cycles and code size, so
+ regression tests can report resource usage (rfe 700441)
+ * support/regression/collate-results.py: report resource usage
+ * support/regression/ports/ds390/spec.mk,
+ * support/regression/ports/hc08/spec.mk,
+ * support/regression/ports/mcs51/spec.mk,
+ * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
+ * support/regression/ports/ds390/uCsim.cmd,
+ * support/regression/ports/hc08/uCsim.cmd,
+ * support/regression/ports/mcs51/uCsim.cmd,
+ * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
+ * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
+ library, use the default one
+ * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
+ building the library
+
2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
* config.dsp: added dependency on .version and configure_vc.awk
BUILDDIR = build
# Default
PORT = z80
+ifndef PORTDIR
PORTDIR = $(BUILDDIR)/$(PORT)
+endif
SOURCES = _atof.c _atoi.c _atol.c _autobaud.c _bp.c _schar2fs.c \
_decdptr.c _divsint.c _divslong.c _divuint.c \
small-mcs51-stack-auto:
if [ "`grep mcs51 ../../ports.build`" = mcs51 ]; then \
- $(MAKE) MODELFLAGS="--model-small --stack-auto" PORT=small-stack-auto PORTINCDIR=$(INCDIR)/mcs51 objects; \
+ $(MAKE) MODELFLAGS="--model-small --stack-auto" PORT=small PORTDIR=$(BUILDDIR)/small-stack-auto PORTINCDIR=$(INCDIR)/mcs51 objects; \
fi
model-mcs51-stack-auto:
if [ "`grep mcs51 ../../ports.build`" = mcs51 ]; then \
for model in $(MODELS); do \
- $(MAKE) MODELFLAGS="--model-$$model --stack-auto" PORT=$$model-stack-auto PORTINCDIR=$(INCDIR)/mcs51 objects; \
+ $(MAKE) MODELFLAGS="--model-$$model --stack-auto" PORT=$$model PORTDIR=$(BUILDDIR)/$$model-stack-auto PORTINCDIR=$(INCDIR)/mcs51 objects; \
done \
fi
model-mcs51-xstack-auto:
if [ "`grep mcs51 ../../ports.build`" = mcs51 ]; then \
for model in $(MODELS); do \
- $(MAKE) MODELFLAGS="--model-$$model --stack-auto --xstack" PORT=$$model-xstack-auto PORTINCDIR=$(INCDIR)/mcs51 objects; \
+ $(MAKE) MODELFLAGS="--model-$$model --stack-auto --xstack" PORT=$$model PORTDIR=$(BUILDDIR)/$$model-xstack-auto PORTINCDIR=$(INCDIR)/mcs51 objects; \
done \
fi
-/* This implemenation is based on an example I once grabbed from
+/* This implemenation is based on an example I once grabbed from
the Philips bbs.
- Don't know who wrote it, but is has been hacked so heavely, he/she wouldn't
+ Don't know who wrote it, but is has been hacked so heavily, he/she wouldn't
recogize it anyway */
-//#define DEBUG_I2C ==> DON'T DO THIS IS A LIBRARY <==
+//#define DEBUG_I2C ==> DON'T DO THIS, THIS IS A LIBRARY <==
#ifdef DEBUG_I2C
#include <stdio.h>
I2CDelay(I2CDELAY);
SDA_HIGH; /* ...and then SDA up -> stop condition. */
I2CDelay(I2CDELAY);
-
+
return (SCL_IN && SDA_IN); /* Both will be up, if everything is fine */
}
* Returns 0 on success, 1 if we lose arbitration.
*/
-char BitOutI2C(char bout)
+char BitOutI2C(unsigned char bout)
{
SDA_OUT(bout); /* Put data out on SDA */
I2CDelay(I2CDELAY);
- SCL_HIGH; /* Let SCL go up */
- while(!SCL_IN) /* Wait until all other devices are ready */
+ SCL_HIGH; /* Let SCL go up */
+ while(!SCL_IN) /* Wait until all other devices are ready */
{
// should do a timeout here
}
-
- if (SDA_IN != bout) /* Arbitration lost, release bus and return */
+
+ if (SDA_IN != bout) /* Arbitration lost, release bus and return */
{
- SDA_HIGH; /* Should be up anyway, but make sure */
+ SDA_HIGH; /* Should be up anyway, but make sure */
i2cError = I2CERR_LOST;
I2CDumpError(i2cError);
return 1;
}
I2CDelay(I2CDELAY);
SCL_LOW; /* Pull SCL back down */
- I2CDelay(I2CDELAY);
+ I2CDelay(I2CDELAY);
return 0; /* OK */
}
char BitInI2C(void)
{
char bin;
-
+
// SDA is opencollector, so:
SDA_HIGH;
-
- SCL_HIGH; /* Let SCL go up */
- while(!SCL_IN) /* Wait for other devices */
+
+ SCL_HIGH; /* Let SCL go up */
+ while(!SCL_IN) /* Wait for other devices */
{
// should do a timeout here
}
- bin = SDA_IN; /* Read in data */
+ bin = SDA_IN; /* Read in data */
I2CDelay(I2CDELAY);
SCL_LOW; /* Pull SCL back up */
I2CDelay(I2CDELAY);
char ByteOutI2C(char dat)
{
char bit_count;
-
+
bit_count = 8;
while(bit_count) {
if (dat & 0x80) {
dat <<= 1;
bit_count--;
}
-
+
if (BitInI2C()) {
i2cError = I2CERR_NAK;
I2CDumpError(i2cError);
char I2CByteIn(char ack)
{
char bit_count, byte_in;
-
+
bit_count = 8;
byte_in = 0;
-
+
while(bit_count)
{
byte_in <<= 1;
if (BitInI2C()) byte_in |= 0x01;
bit_count--;
}
-
+
BitOutI2C(ack);
SDA_HIGH; /* Added 18-Jul-95 - thanks to Ray Bellis */
return byte_in;
char I2CSendStop(char addr, char count, char send_stop)
{
char byteptr, byte_out;
-
+
if (I2CStart()) return 1;
i2cError = 0;
-
+
byte_out = addr & 0xfe; /* Ensure that it's a write address */
count++; /* Include slave address to byte count */
byteptr = 0;
byteptr++;
count--;
}
-
+
if (send_stop) I2CStop();
return 0;
}
char i2c_recv(char addr, char count)
{
char byteptr, byte_in;
-
+
if (I2CStart()) return 1;
i2cError = 0;
byteptr = 0;
-
+
byte_in = addr | 0x01;
-
+
if (ByteOutI2C(byte_in))
{
if (i2cError == I2CERR_NAK) I2CStop();
return i2cError;
}
-
+
while(count)
{
count-=1;
i2cReceiveBuffer[byteptr] = byte_in;
byteptr++;
}
-
+
I2CStop();
-
+
return (i2cError ? 1 : 0);
}
{
/* If send fails, abort but don't send a stop condition if we lost
arbitration */
-
+
if (i2cError != I2CERR_LOST) I2CStop();
return 1;
}
-
+
SDA_HIGH; /* One of these may be low now, in which case the next */
SCL_HIGH; /* start condition wouldn't be detected so make */
I2CDelay(I2CDELAY); /* sure that they're up and wait for one delay slot */
-
+
if (i2c_recv((char)(addr|0x01), rx_count)) return 1;
return (i2cError ? 1 : 0);
}
\labelwidthstring 00.00.0000
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-xstack-loc
+\series default
+
+\begin_inset LatexCommand \index{-\/-xstack-loc <Value>}
+
+\end_inset
+
+\SpecialChar ~
+<Value> By default the external stack
+\begin_inset LatexCommand \index{xstack}
+
+\end_inset
+
+ is placed after the pdata segment.
+ Using this option the xstack can be placed anywhere in the external memory
+ space of the 8051.
+ The value entered can be in Hexadecimal or Decimal format, e.g.
+ -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-xstack-loc 0x8000 or -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-stack-loc 32768.
+ The provided value should not overlap any other memory areas such as the
+ pdata or xdata segment and with enough space for the current application.
+\layout List
+\labelwidthstring 00.00.0000
+
+
\series bold
-
\begin_inset ERT
if it is not reentrant.
Furthermore nonreentrant functions should not be called from the main program
while the interrupt service routine might be active.
-
+ They also must not be called from low priority interrupt service routines
+ while a high priority interrupt service routine might be active. You could use
+ semaphores or make the function
+\emph on
+ critical
+\emph default
+ if all parameters are passed in registers.
\newline
\newline
not supported.
\layout Itemize
-No support for setjmp
-\begin_inset LatexCommand \index{setjmp (not supported)}
-
-\end_inset
-
- and longjmp
-\begin_inset LatexCommand \index{longjmp (not supported)}
-
-\end_inset
-
- (for now).
-\layout Itemize
-
Old K&R style
\begin_inset LatexCommand \index{K\&R style}
\end_deeper
\layout Itemize
+Most enhancements in C99 are not supported, f.e.:
+\begin_deeper
+\layout Verse
+
+
+\family typewriter
+\series bold
+inline
+\series default
+ int increment (int a) { return a+1; } /* is invalid in SDCC although allowed
+ in C99 */
+\newline
+for (
+\series bold
+int
+\series default
+ i=0; i<10; i++) /* is invalid in SDCC although allowed in C99 */
+\end_deeper
+\layout Itemize
+
Certain words that are valid identifiers in the standard may be reserved
words in SDCC unless the
\series bold
switch (options.model)
{
case MODEL_SMALL:
- c = "small";
+ if (options.stackAuto)
+ c = "small-stack-auto";
+ else
+ c = "small";
break;
case MODEL_MEDIUM:
- c = "medium";
+ if (options.stackAuto)
+ c = "medium-stack-auto";
+ else
+ c = "medium";
break;
case MODEL_LARGE:
- c = "large";
+ if (options.stackAuto)
+ c = "large-stack-auto";
+ else
+ c = "large";
break;
case MODEL_FLAT24:
/* c = "flat24"; */
{
char restart = 0;
char lines[MAX_PATTERN_LEN];
- char *lp;
+ char *lp, *rp;
lineNode *match;
lineNode *replace;
lineNode *currL = NULL;
EXPECT_CHR (bp, '{', "expected '{'\n");
bp++;
+ /* save char position (needed for generating error msg) */
+ rp = bp;
+
SKIP_SPACE (bp, "unexpected end of rule\n");
getPeepLine (&replace, &bp);
newPeepRule (match, replace, lines, restart);
}
else
- newPeepRule (match, replace, NULL, restart);
+ {
+ if (*bp && strncmp (bp, "replace", 7))
+ {
+ /* not the start of a new peeprule, so "if" should be here */
+
+ char strbuff[1000];
+ char *cp;
+
+ /* go to the start of the line following "{" of the "by" token */
+ while (*rp && (*rp == '\n'))
+ rp++;
+
+ /* copy text of rule starting with line after "by {" */
+ cp = strbuff;
+ while (*rp && (rp < bp) && ((cp - strbuff) < sizeof(strbuff)))
+ *cp++ = *rp++;
+
+ /* and now the rest of the line */
+ while (*rp && (*rp != '\n') && ((cp - strbuff) < sizeof(strbuff)))
+ *cp++ = *rp++;
+
+ *cp = '\0';
+ fprintf (stderr, "%s\nexpected '} if ...'\n", strbuff);
+ return;
+ }
+ newPeepRule (match, replace, NULL, restart);
+ }
goto top;
}
/* restore the register bank */
if ( /* FUNC_REGBANK (sym->type) || */ IFFUNC_ISISR (sym->type))
{
- if (/* !FUNC_REGBANK (sym->type) || */ !IFFUNC_ISISR (sym->type)
+ if (!FUNC_REGBANK (sym->type) || !IFFUNC_ISISR (sym->type)
|| !options.useXstack)
{
/* Special case of ISR using non-zero bank with useXstack
$(MAKE) test-port PORT=mcs51-large
test-mcs51-stack-auto:
- $(MAKE) make_library test-port PORT=mcs51-stack-auto
+ $(MAKE) test-port PORT=mcs51-stack-auto
test-mcs51-xstack-auto:
$(MAKE) make_library test-port PORT=mcs51-xstack-auto
failures = 0
cases = 0
tests = 0
+bytes = 0
+ticks = 0
for line in lines:
- # '--- Summary: f/t/c ...', where f = # failures, t = # test points,
+ if (re.search(r'^--- Running', line)):
+ name = line
+ # '--- Summary: f/t/c: ...', where f = # failures, t = # test points,
# c = # test cases.
if (re.search(r'^--- Summary:', line)):
(summary, data, rest) = re.split(r':', line)
failures = failures + string.atof(nfailures)
tests = tests + string.atof(ntests)
cases = cases + string.atof(ncases)
+ if (string.atof(nfailures)):
+ print name
-print "%.0f failures, %.0f tests, %.0f test cases" % (failures, tests, cases)
+ # '--- Simulator: b/t: ...', where b = # bytes, t = # ticks
+ if (re.search(r'^--- Simulator:', line)):
+ (simulator, data, rest) = re.split(r':', line)
+ (nbytes, nticks) = re.split(r'/', data)
+ bytes = bytes + string.atof(nbytes)
+ ticks = ticks + string.atof(nticks)
+
+print "%.0f failures, %.0f tests, %.0f test cases, %.0f bytes, %.0f ticks" % (failures, tests, cases, bytes, ticks)
--- /dev/null
+import sys, re
+import string
+
+"""Simple script that scans all of the simulator output text fed in
+through stdin and summarises the total number of system clock ticks."""
+
+# Read in everything
+lines = sys.stdin.readlines()
+
+# Declare globals
+bytes = 0
+ticks = 0
+
+for line in lines:
+ # 'n words read from ...', where = # bytes in hex file
+ if (re.search(r'words read from', line)):
+ (data, post) = re.split(r'w', line, 1)
+ bytes = string.atoi(data)
+
+ # 'Total time since last reset= 0.102021 sec (i clks)',
+ # where i = # system clock ticks.
+ if (re.search(r'^Total time', line)):
+ (pre, data) = re.split(r'\(', line)
+ (nticks, post) = re.split(r' ', data)
+ ticks = string.atoi(nticks)
+
+print "\n--- Simulator: %d/%d: %d bytes, %d ticks" % (bytes, ticks, bytes, ticks)
# run simulator with 25 seconds timeout
%.out: %$(EXEEXT) fwk/lib/timeout
mkdir -p `dirname $@`
- -fwk/lib/timeout 25 $(S51) -tds390f -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/ds390/uCsim.cmd >/dev/null || \
+ -fwk/lib/timeout 25 $(S51) -tds390f -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/ds390/uCsim.cmd > $(@:.out=.sim) || \
echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@
+ python get_ticks.py < $(@:.out=.sim) >> $@
-grep -n FAIL $@ /dev/null || true
fwk/lib/timeout: fwk/lib/timeout.c
set error stack off
break xram r 0x7654
run
+state
quit
# 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 > $@ \
+ -fwk/lib/timeout 10 $(UCHC08) $< < $(PORTS_DIR)/$(PORT)/uCsim.cmd > $@ \
|| echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@
+ python get_ticks.py < $@ >> $@
-grep -n FAIL $@ /dev/null || true
fwk/lib/timeout: fwk/lib/timeout.c
set error memory off
set error stack off
run
+state
quit
#
# model small stack-auto
-include $(PORTS_DIR)/mcs51/spec.mk
-
-LIBSRCDIR = ../../device/lib
-LIBDIR = gen/$(PORT)/lib
-
-LIBSDCCFLAGS+=--stack-auto
-SDCCFLAGS +=$(LIBSDCCFLAGS)
+SDCCFLAGS +=--stack-auto
# copy support.c
$(PORTS_DIR)/$(PORT)/%.c: $(PORTS_DIR)/mcs51/%.c
cp $< $@
-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 \
- _fs2uchar.c _fs2uint.c _fs2ulong.c \
- _fsadd.c _fssub.c _fsdiv.c _fsmul.c \
- _fseq.c _fsneq.c _fsgt.c _fslt.c _fscmp.c \
- fabsf.c sqrtf.c logf.c log10f.c powf.c tanf.c \
- errno.c frexpf.c ldexpf.c tancotf.c \
- _fsget1arg.c _fsget2args.c _fsnormalize.c \
- _fsreturnval.c _fsrshift.c _fsswapargs.c \
- _gptrget.c _gptrput.c \
- _sint2fs.c _iscntrl.c _isdigit.c _isgraph.c \
- _islower.c _isprint.c _ispunct.c _isspace.c \
- _isupper.c _isxdigit.c _slong2fs.c \
- _memcmp.c _memcpy.c _memmove.c _memset.c \
- _modsint.c _modslong.c _moduint.c _modulong.c \
- _mulint.c _mullong.c \
- _ser.c _setjmp.c \
- _spx.c _startup.c \
- _strcat.c _strchr.c _strcmp.c _strcpy.c \
- _strcspn.c _strlen.c _strncat.c _strncmp.c \
- _strncpy.c _strpbrk.c _strrchr.c _strspn.c \
- _strstr.c _strtok.c \
- _uchar2fs.c _uint2fs.c _ulong2fs.c \
- calloc.c malloc.c realloc.c free.c \
- serial.c ser_ir.c printfl.c \
- printf_large.c sprintf.c vprintf.c puts.c gets.c \
- assert.c time.c printf_fast.c bpx.c
-
-OBJECTS = $(patsubst %.c,$(LIBDIR)/%.rel,$(SOURCES))
-MODULES = $(patsubst %.c,%,$(SOURCES))
-
-MAKE_LIBRARY = $(LIBDIR) $(OBJECTS) lib-files
-
-$(LIBDIR):
- mkdir -p $(LIBDIR)
-
-$(LIBDIR)/%.rel: $(LIBSRCDIR)/%.c
- -$(SDCC) -I../../device/include $(LIBSDCCFLAGS) -c $< -o $@
+include $(PORTS_DIR)/mcs51/spec.mk
-.PHONY: lib-files
-lib-files:
- make -C $(LIBSRCDIR)/mcs51 all
- cp $(LIBSRCDIR)/mcs51/*.rel $(LIBSRCDIR)/mcs51/mcs51.lib $(LIBDIR)
- echo $(MODULES) | tr ' ' '\n' > $(LIBDIR)/libsdcc.lib
- touch $(LIBDIR)/libfloat.lib $(LIBDIR)/libint.lib $(LIBDIR)/liblong.lib
+LIBDIR = $(SDCC_DIR)/device/lib/build/small-stack-auto
# Port specification for the mcs51 port running with uCsim
#
-# model small stack-auto
+# model small xstack-auto
-include $(PORTS_DIR)/mcs51-stack-auto/spec.mk
+include $(PORTS_DIR)/mcs51/spec.mk
-LIBSDCCFLAGS+= --xstack
+LIBSRCDIR = ../../device/lib
+LIBDIR = gen/$(PORT)/lib
+
+LIBSDCCFLAGS+=--stack-auto --xstack
SDCCFLAGS +=$(LIBSDCCFLAGS)
+
+# copy support.c
+$(PORTS_DIR)/$(PORT)/%.c: $(PORTS_DIR)/mcs51/%.c
+ cp $< $@
+
+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 \
+ _fs2uchar.c _fs2uint.c _fs2ulong.c \
+ _fsadd.c _fssub.c _fsdiv.c _fsmul.c \
+ _fseq.c _fsneq.c _fsgt.c _fslt.c _fscmp.c \
+ fabsf.c sqrtf.c logf.c log10f.c powf.c tanf.c \
+ errno.c frexpf.c ldexpf.c tancotf.c \
+ _fsget1arg.c _fsget2args.c _fsnormalize.c \
+ _fsreturnval.c _fsrshift.c _fsswapargs.c \
+ _gptrget.c _gptrput.c \
+ _sint2fs.c _iscntrl.c _isdigit.c _isgraph.c \
+ _islower.c _isprint.c _ispunct.c _isspace.c \
+ _isupper.c _isxdigit.c _slong2fs.c \
+ _memcmp.c _memcpy.c _memmove.c _memset.c \
+ _modsint.c _modslong.c _moduint.c _modulong.c \
+ _mulint.c _mullong.c \
+ _ser.c _setjmp.c \
+ _spx.c _startup.c \
+ _strcat.c _strchr.c _strcmp.c _strcpy.c \
+ _strcspn.c _strlen.c _strncat.c _strncmp.c \
+ _strncpy.c _strpbrk.c _strrchr.c _strspn.c \
+ _strstr.c _strtok.c \
+ _uchar2fs.c _uint2fs.c _ulong2fs.c \
+ calloc.c malloc.c realloc.c free.c \
+ serial.c ser_ir.c printfl.c \
+ printf_large.c sprintf.c vprintf.c puts.c gets.c \
+ assert.c time.c bpx.c
+
+OBJECTS = $(patsubst %.c,$(LIBDIR)/%.rel,$(SOURCES))
+MODULES = $(patsubst %.c,%,$(SOURCES))
+
+MAKE_LIBRARY = $(LIBDIR) $(OBJECTS) lib-files
+
+$(LIBDIR):
+ mkdir -p $(LIBDIR)
+
+$(LIBDIR)/%.rel: $(LIBSRCDIR)/%.c
+ -$(SDCC) -I../../device/include $(LIBSDCCFLAGS) -c $< -o $@
+
+.PHONY: lib-files
+lib-files:
+ make -C $(LIBSRCDIR)/mcs51 all
+ cp $(LIBSRCDIR)/mcs51/*.rel $(LIBSRCDIR)/mcs51/mcs51.lib $(LIBDIR)
+ echo $(MODULES) | tr ' ' '\n' > $(LIBDIR)/libsdcc.lib
+ touch $(LIBDIR)/libfloat.lib $(LIBDIR)/libint.lib $(LIBDIR)/liblong.lib
# run simulator with 30 seconds timeout
%.out: %$(EXEEXT) fwk/lib/timeout
mkdir -p `dirname $@`
- -fwk/lib/timeout 30 $(S51) -t32 -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/mcs51/uCsim.cmd >/dev/null \
+ -fwk/lib/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 get_ticks.py < $(@:.out=.sim) >> $@
-grep -n FAIL $@ /dev/null || true
fwk/lib/timeout: fwk/lib/timeout.c
set error stack off
break xram r 0x7654
run
+state
quit
# 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 > $@ \
+ -fwk/lib/timeout 10 $(UCZ80) $< < $(PORTS_DIR)/$(PORT)/uCsim.cmd > $@ \
|| echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@
+ python get_ticks.py < $@ >> $@
-grep -n FAIL $@ /dev/null || true
fwk/lib/timeout: fwk/lib/timeout.c
set error memory off
set error stack off
run
+state
quit