1 # Port specification for the xa51 port running with uCsim
4 SXA_A = $(SDCC_DIR)/sim/ucsim/xa.src/sxa
5 SXA_B = $(SDCC_DIR)/bin/sxa
7 SXA = $(shell if [ -f $(SXA_A) ]; then echo $(SXA_A); else echo $(SXA_B); fi)
9 SDCCFLAGS +=-mxa51 --lesspedantic -DREENTRANT=
14 EXTRAS = fwk/lib/testfwk$(OBJEXT) $(PORTS_DIR)/$(PORT)/support$(OBJEXT)
16 # Rule to link into .hex
17 %$(EXEEXT): %$(OBJEXT) $(EXTRAS)
18 $(SDCC) $(SDCCFLAGS) $(EXTRAS) $<
19 mv fwk/lib/testfwk.hex $@
20 mv fwk/lib/testfwk.map $(@:.hex=.map)
23 $(SDCC) $(SDCCFLAGS) -c $<
25 # run simulator with 10 seconds timeout
26 %.out: %$(EXEEXT) fwk/lib/timeout
28 -fwk/lib/timeout 10 $(SXA) -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/xa51/uCsim.cmd >/dev/null || \
29 echo -e --- FAIL: \"timeout, simulation killed\" in $(<:.ihx=.c)"\n"--- Summary: 1/1/1: timeout >> $@
30 -grep -n FAIL $@ /dev/null || true
32 fwk/lib/timeout: fwk/lib/timeout.c
35 rm -f fwk/lib/timeout fwk/lib/timeout.exe $(PORTS_DIR)/$(PORT)/*.rel $(PORTS_DIR)/$(PORT)/*.rst \
36 $(PORTS_DIR)/$(PORT)/*.lst $(PORTS_DIR)/$(PORT)/*.sym $(PORTS_DIR)/$(PORT)/*.xa temp.lnk