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;
|
_mode = Device::MEM_MODE;
|
||||||
else
|
else
|
||||||
_mode = Device::SPI_MODE;
|
_mode = Device::SPI_MODE;
|
||||||
} else {
|
} else { // unknown type -> sanity check
|
||||||
_mode = Device::SPI_MODE;
|
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