1 # Port specification for the xa51 port running with uCsim
8 SXA_A = $(top_builddir)/sim/ucsim/xa.src/sxa
9 SXA_B = $(top_builddir)/bin/sxa
11 SXA = $(shell if [ -f $(SXA_A) ]; then echo $(SXA_A); else echo $(SXA_B); fi)
13 SDCCFLAGS +=-mxa51 --less-pedantic -DREENTRANT= -I$(top_srcdir)
18 EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
20 # Rule to link into .hex
21 %$(EXEEXT): %$(OBJEXT) $(EXTRAS)
22 $(SDCC) $(SDCCFLAGS) $(EXTRAS) $< -o $@
25 $(SDCC) $(SDCCFLAGS) -c $< -o $@
27 $(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.c
28 $(SDCC) $(SDCCFLAGS) -c $< -o $@
30 $(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c
31 $(SDCC) $(SDCCFLAGS) -c $< -o $@
33 # run simulator with 1 second timeout
34 %.out: %$(EXEEXT) $(CASES_DIR)/timeout
36 -$(CASES_DIR)/timeout 1 $(SXA) -S in=$(DEV_NULL),out=$@ $< < $(PORTS_DIR)/xa51/uCsim.cmd >/dev/null || \
37 echo -e --- FAIL: \"timeout, simulation killed\" in $(<:.ihx=.c)"\n"--- Summary: 1/1/1: timeout >> $@
38 -grep -n FAIL $@ /dev/null || true
40 $(CASES_DIR)/timeout: fwk/lib/timeout.c
41 $(CC) $(CFLAGS) $< -o $@