Compare commits
3 Commits
e5b08cd0a1
...
af79a7dc6c
| Author | SHA1 | Date |
|---|---|---|
|
|
af79a7dc6c | |
|
|
b6df4b8699 | |
|
|
4d23e09fb2 |
10
src/main.cpp
10
src/main.cpp
|
|
@ -184,6 +184,16 @@ int main(int argc, char **argv)
|
|||
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)
|
||||
cout << "write to ram" << endl;
|
||||
if (args.prg_type == Device::WR_FLASH)
|
||||
|
|
|
|||
Loading…
Reference in New Issue