From feb20b2feef244cbbae59dfaa3378e8e28d6d38e Mon Sep 17 00:00:00 2001 From: Thomas Vogel Date: Thu, 14 Mar 2019 16:02:20 +0100 Subject: X300: add capability to flash NI-2974 FPGA The NI-2974 has a X310 inside but reports a different "product" when polled. This prevents the image_loader from flashing a new FPGA image, this patch enables this. --- host/lib/usrp/x300/x300_image_loader.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/x300') diff --git a/host/lib/usrp/x300/x300_image_loader.cpp b/host/lib/usrp/x300/x300_image_loader.cpp index 5cb1f1b85..28ea699f5 100644 --- a/host/lib/usrp/x300/x300_image_loader.cpp +++ b/host/lib/usrp/x300/x300_image_loader.cpp @@ -228,10 +228,15 @@ static void x300_setup_session(x300_session_t& session, if (!session.dev_addr.has_key("product") or session.fpga_type == "") { throw uhd::runtime_error( "Found a device but could not auto-generate an image filename."); - } else + } else { + std::string fpga_file_type = to_lower_copy(session.dev_addr["product"]); + if (fpga_file_type == "ni-2974") { + fpga_file_type = "x310"; + } session.filepath = find_image_path( str(boost::format("usrp_%s_fpga_%s.bit") - % (to_lower_copy(session.dev_addr["product"])) % session.fpga_type)); + % fpga_file_type % session.fpga_type)); + } } else session.filepath = filepath; -- cgit v1.2.3