xilinx: fail write-flash on SPI access errors; improve open-file errors

This commit is contained in:
Nicholas Dietz
2026-07-01 14:55:32 +02:00
committed by Gwenhael Goavec-Merou
parent ed82b6de3b
commit 09e250b856
2 changed files with 19 additions and 14 deletions
+2 -2
View File
@@ -804,14 +804,14 @@ int spi_comm(struct arguments args, const cable_t &cable,
bit = new RawParser(args.bit_file, false);
printSuccess("DONE");
} catch (std::exception &e) {
printError("FAIL");
printError("FAIL: unable to open '" + args.bit_file + "': " + std::string(e.what()));
delete spi;
return EXIT_FAILURE;
}
printInfo("Parse file ", false);
if (bit->parse() == EXIT_FAILURE) {
printError("FAIL");
printError("FAIL: unable to parse '" + args.bit_file + "'");
delete bit;
delete spi;
return EXIT_FAILURE;