mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-22 06:07:36 +02:00
lattice: if unknown file type, fails only for SRAM
This commit is contained in:
+4
-1
@@ -149,7 +149,10 @@ Lattice::Lattice(Jtag *jtag, const string filename, const string &file_type,
|
||||
_mode = Device::FLASH_MODE;
|
||||
else
|
||||
_mode = Device::MEM_MODE;
|
||||
} else {
|
||||
} else { /* unknown type: */
|
||||
if (prg_type == Device::WR_FLASH) /* to flash: OK */
|
||||
_mode = Device::FLASH_MODE;
|
||||
else /* otherwise: KO */
|
||||
throw std::runtime_error("incompatible file format");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user