Is this test really needed?
|
std::string mode = bit->getHeaderVal("mode"); |
|
if (mode.find("passive") != std::string::npos) { |
|
delete bit; |
|
throw std::runtime_error("passive mode not supported for flash"); |
|
} |
This causes an exception when trying to flash a bitstream in .bit format as that evaluates to being passive. Flashing .hex files however works as these are identified to be active (or not passive to be precise). But it fails even worse when trying to flash raw files (which I do to load retro ROMs into unused flash areas) as then no mode header value exists at all which in turn makes getHeaderVal() throw an exception.
Edit: Removing this test fixes all my issues. I can even flash the .bit file, and it's successfully and actively loaded and run by the FPGA. Maybe this should only trigger a warning as there doesn't seem to be any harm when flashing a .bit file.
Is this test really needed?
openFPGALoader/src/efinix.cpp
Lines 221 to 225 in b9486b0
This causes an exception when trying to flash a bitstream in .bit format as that evaluates to being passive. Flashing .hex files however works as these are identified to be active (or not passive to be precise). But it fails even worse when trying to flash raw files (which I do to load retro ROMs into unused flash areas) as then no mode header value exists at all which in turn makes getHeaderVal() throw an exception.
Edit: Removing this test fixes all my issues. I can even flash the .bit file, and it's successfully and actively loaded and run by the FPGA. Maybe this should only trigger a warning as there doesn't seem to be any harm when flashing a .bit file.