Merge b6df4b8699 into 212a025de8
This commit is contained in:
commit
6e8d9bb7e6
10
src/main.cpp
10
src/main.cpp
|
|
@ -183,6 +183,16 @@ int main(int argc, char **argv)
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if file exists and is readable
|
||||||
|
{
|
||||||
|
std::ifstream file(args.bit_file);
|
||||||
|
if (!args.bit_file.empty() && !file.good()) {
|
||||||
|
printError("Error: cannot open file '" + args.bit_file + "'");
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
file.close();
|
||||||
|
}
|
||||||
|
|
||||||
if (args.prg_type == Device::WR_SRAM)
|
if (args.prg_type == Device::WR_SRAM)
|
||||||
std::cout << "write to ram" << std::endl;
|
std::cout << "write to ram" << std::endl;
|
||||||
if (args.prg_type == Device::WR_FLASH)
|
if (args.prg_type == Device::WR_FLASH)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue