1 # Port specification for the ds390 port running with uCsim
4 S51 = $(SDCC_DIR)/sim/ucsim/s51.src/s51
6 SDCCFLAGS +=-mds390 --lesspedantic -DREENTRANT=reentrant --stack-after-data
11 EXTRAS = fwk/lib/testfwk$(OBJEXT) $(PORTS_DIR)/$(PORT)/support$(OBJEXT)
13 # Rule to link into .ihx
14 %$(EXEEXT): %$(OBJEXT) $(EXTRAS)
15 $(SDCC) $(SDCCFLAGS) $(EXTRAS) $<
16 mv fwk/lib/testfwk.ihx $@
17 mv fwk/lib/testfwk.map $(@:.ihx=.map)
20 $(SDCC) $(SDCCFLAGS) -c $<
22 # run simulator with 10 seconds timeout
23 %.out: %$(EXEEXT) fwk/lib/timeout
25 -fwk/lib/timeout 10 $(S51) -tds390f -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/ds390/uCsim.cmd >/dev/null || \
26 echo -e --- FAIL: \"timeout, simulation killed\" in $(<:.ihx=.c)"\n"--- Summary: 1/1/1: timeout >> $@
27 -grep -n FAIL $@ /dev/null || true
29 fwk/lib/timeout: fwk/lib/timeout.c
32 rm -f fwk/lib/timeout fwk/lib/timeout.exe $(PORTS_DIR)/$(PORT)/*.rel $(PORTS_DIR)/$(PORT)/*.rst \
33 $(PORTS_DIR)/$(PORT)/*.lst $(PORTS_DIR)/$(PORT)/*.sym $(PORTS_DIR)/$(PORT)/*.asm temp.lnk