if"Generating bistream of project succeed"notinstatus:
# TODO Following check is hugly and error prone, since it inspects nanoxpython log. Change to check command return code instead using something like subprocess.check_call
# Extract return code out of make? or avoid using Makefiles and call directly nanoxpython etc.
# (Two parts of check is due to nanoxpython 2.9.0 having a typo in its log - 'bistream' - that nanoxpython 2.9.2. does not)
if("Generating bistream of project succeed"notinstatus)and("Generating bitstream of project succeed"notinstatus):
bitFilesHeader.close()
panic('Bitfile synthesis failed in "%s"'%os.getcwd())
btfileSize=os.path.getsize('bitfile-swapped.nxb')# in bytes