1 # Regression test specification for the pic16 target running with gpsim
5 GPSIM := $(GPSIM_PATH)/gpsim
11 SDCCFLAGS += --nostdinc
12 LINKFLAGS += --nostdlib -L $(top_builddir)/device/lib/build/pic16
15 SDCCFLAGS += -mpic16 -pp18f452 -I$(top_srcdir)/device/include/pic16 --less-pedantic -Wl,-q -DREENTRANT=reentrant -I$(top_srcdir)
16 SDCCFLAGS += --no-peep
17 LINKFLAGS += libsdcc.lib libc18f.lib libm18f.lib
22 EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
24 # Rule to link into .ihx
25 %$(EXEEXT): %$(OBJEXT) $(EXTRAS)
26 -$(SDCC) $(SDCCFLAGS) $(LINKFLAGS) $(EXTRAS) $< -o $@
29 -$(SDCC) $(SDCCFLAGS) -c $< -o $@
31 $(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.c
32 -$(SDCC) $(SDCCFLAGS) -c $< -o $@
34 .PRECIOUS: gen/pic16/testfwk.o gen/pic16/support.o
36 $(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c
37 $(SDCC) $(SDCCFLAGS) -c $< -o $@
39 # run simulator with 25 seconds timeout
40 %.out: %$(EXEEXT) $(CASES_DIR)/timeout
42 -$(CASES_DIR)/timeout 25 "$(GPSIM)" -i -s $< -c $(PORTS_DIR)/pic16/gpsim.cmd > $@ || \
43 echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@
44 python $(srcdir)/get_ticks.py < $@ >> $@
45 -grep -n FAIL $@ /dev/null || true
47 $(CASES_DIR)/timeout: fwk/lib/timeout.c
48 $(CC) $(CFLAGS) $< -o $@