1 # Port specification for the mcs51 port running with uCsim
4 S51 = ../../sim/ucsim/s51.src/s51
6 SDCCFLAGS += --lesspedantic -DREENTRANT=reentrant --stack-after-data
11 EXTRAS = fwk/lib/testfwk$(OBJEXT) ports/$(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 5 seconds timeout
23 %.out: %$(EXEEXT) ports/$(PORT)/timeout
25 -ports/$(PORT)/timeout 5 $(S51) -t32 -S in=/dev/null,out=$@ $< < ports/mcs51/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 ports/$(PORT)/timeout: ports/$(PORT)/timeout.c
33 rm -f ports/$(PORT)/timeout ports/$(PORT)/timeout.exe ports/$(PORT)/*.rel ports/$(PORT)/*.rst \
34 ports/$(PORT)/*.lst ports/$(PORT)/*.sym ports/$(PORT)/*.asm temp.lnk