altera: check file type: for an unknown type user has to explicitly provides flash mode fails otherwise
This commit is contained in:
parent
b27422cbe9
commit
28620f8ce9
|
|
@ -42,8 +42,16 @@ Altera::Altera(Jtag *jtag, const std::string &filename,
|
|||
_mode = Device::MEM_MODE;
|
||||
else
|
||||
_mode = Device::SPI_MODE;
|
||||
} else {
|
||||
_mode = Device::SPI_MODE;
|
||||
} else { // unknown type -> sanity check
|
||||
if (prg_type == Device::WR_SRAM) {
|
||||
printError("file has an unknown type:");
|
||||
printError("\tplease use rbf or svf file");
|
||||
printError("\tor use --write-flash with: ", false);
|
||||
printError("-b board_name or --fpga_part xxxx");
|
||||
std::runtime_error("Error: wrong file");
|
||||
} else {
|
||||
_mode = Device::SPI_MODE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue