Skip to content

Commit

Permalink
main: (SPI mode) sanity check: print error and quit when manufacturer…
Browse files Browse the repository at this point in the history
… is unknown
  • Loading branch information
trabucayre committed Jul 27, 2023
1 parent a89fc54 commit a1e9d3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ int main(int argc, char **argv)
target = new CologneChip(spi, args.bit_file, args.file_type, args.prg_type,
board->reset_pin, board->done_pin, DBUS6, board->oe_pin,
args.verify, args.verbose);
} else {
printError("Error (SPI mode): " + board->manufacturer +
" is an unsupported/unknown target");
return EXIT_FAILURE;
}
if (args.prg_type == Device::RD_FLASH) {
if (args.file_size == 0) {
Expand Down

0 comments on commit a1e9d3f

Please sign in to comment.