1 # Regression test specification for the pic14 target running with gpsim
5 GPSIM := $(GPSIM_PATH)/gpsim
11 SDCCFLAGS += --nostdinc -I$(top_srcdir)/device/include/pic -I$(top_srcdir)
12 LINKFLAGS += --nostdlib -L$(top_builddir)/device/lib/build/pic
15 SDCCFLAGS += -mpic14 -pp16f877 --less-pedantic -Wl,-q -DREENTRANT=reentrant
16 LINKFLAGS += libsdcc.lib libm.lib
21 EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
23 # Rule to link into .ihx
24 %$(EXEEXT): %$(OBJEXT) $(EXTRAS)
25 -$(SDCC) $(SDCCFLAGS) $(LINKFLAGS) $(EXTRAS) $< -o $@
28 -$(SDCC) $(SDCCFLAGS) -c $< -o $@
30 $(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.c
31 -$(SDCC) $(SDCCFLAGS) -c $< -o $@
33 .PRECIOUS: gen/pic14/testfwk.o gen/pic14/support.o
35 $(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c
36 $(SDCC) $(SDCCFLAGS) -c $< -o $@
38 # run simulator with 25 seconds timeout
39 %.out: %$(EXEEXT) $(CASES_DIR)/timeout
41 -$(CASES_DIR)/timeout 25 "$(GPSIM)" -i -s $< -c $(PORTS_DIR)/pic14/gpsim.cmd > $@ || \
42 echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@
43 python $(srcdir)/get_ticks.py < $@ >> $@
44 -grep -n FAIL $@ /dev/null || true
46 $(CASES_DIR)/timeout: fwk/lib/timeout.c
47 $(CC) $(CFLAGS) $< -o $@