Commit 16acb106 authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

catbstream: Fix small error (SUCCESS on .mcs generation fail)

The script was reporting a success in writing the .mcs file even though
PROMGEN exits with an error and an .mcs file is not generated. This
error is now fixed by checking the return value of the PROMGEN command.
Signed-off-by: Theodor-Adrian Stana's avatarTheodor Stana <t.stana@cern.ch>
parent 0242e161
......@@ -96,7 +96,8 @@ if __name__ == "__main__":
s = raw_input("flash size (KB): ")
a1 = raw_input("bistream 1 start address: 0x")
a2 = raw_input("bistream 2 start address: 0x")
subprocess.call("promgen -w -p mcs -spi -s " + s + " -u " + a1 + " " + fn1 + " -u " + a2 + " " + fn2 + " -o " + fn3, shell=True)
err = subprocess.call("promgen -w -p mcs -spi -s " + s + " -u " + a1 + " " + fn1 + " -u " + a2 + " " + fn2 + " -o " + fn3, shell=True)
print("SUCCESS -- Output written to " + fn3)
if (not err):
print("SUCCESS -- Output written to " + fn3)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment