Forum Discussion
Altera_Forum
Honored Contributor
13 years agoReturn Codes
How to use return codes when programming the device by using the following command (included in the tcl-script): quartus_pgm --mode=as --cable=USB-Blaster --operation=pv\;file_name.pof Quartu...
Altera_Forum
Honored Contributor
13 years agoAnswer swiped from http://www.linuxquestions.org/questions/programming-9/just-wonder-how-to-get-exit-status-of-pragram-in-tcl-code-645406/
--- Quote Start --- quote from activetcl 8.5.2.0 help pages Code: To execute a program that can return a non-zero result, you should wrap the call to exec in catch and check the contents of the -errorcode return option if you have an error:set status 0
if {} {
set details
if { eq "CHILDSTATUS"} {
set status
} else {
# Some kind of unexpected failure
}
}
quote from man n exec Code: To execute a program that can return a non-zero result, you should wrap the call to exec in catch and check | what the contents of the global errorCode variable is if you have an error:
set status 0
if {} {
if { eq "CHILDSTATUS"} {
set status
} else {
# Some kind of unexpected failure
}
}
--- Quote End ---