diff options
author | Thomas Vogel <thomas.vogel@ni.com> | 2019-03-14 16:02:20 +0100 |
---|---|---|
committer | michael-west <michael.west@ettus.com> | 2019-05-21 15:54:35 -0700 |
commit | feb20b2feef244cbbae59dfaa3378e8e28d6d38e (patch) | |
tree | bb349679d64d72a92905f7ca2915411eb75c6792 | |
parent | 223751ad9fbc3bd12953898ea2a6c9e9490e746c (diff) | |
download | uhd-feb20b2feef244cbbae59dfaa3378e8e28d6d38e.tar.gz uhd-feb20b2feef244cbbae59dfaa3378e8e28d6d38e.tar.bz2 uhd-feb20b2feef244cbbae59dfaa3378e8e28d6d38e.zip |
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.
-rw-r--r-- | host/lib/usrp/x300/x300_image_loader.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
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; |