From 13fa66bc2219f06341216487ab1eff3bf90b48bb Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Sun, 20 Nov 2022 17:08:49 +0100 Subject: [PATCH] src/xilinx: zynqXX: load only (#268) --- src/xilinx.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xilinx.cpp b/src/xilinx.cpp index e67f53f..1353031 100644 --- a/src/xilinx.cpp +++ b/src/xilinx.cpp @@ -62,7 +62,11 @@ Xilinx::Xilinx(Jtag *jtag, const std::string &filename, _fpga_family = SPARTAN7_FAMILY; } else if (family == "zynq") { _fpga_family = ZYNQ_FAMILY; + if (_mode != Device::MEM_MODE) + throw std::runtime_error("Error: can't flash Zynq7000"); } else if (family.substr(0, 6) == "zynqmp") { + if (_mode != Device::MEM_MODE) + throw std::runtime_error("Error: can't flash ZynqMP"); if (!zynqmp_init(family)) throw std::runtime_error("Error with ZynqMP init"); _fpga_family = ZYNQMP_FAMILY;