diff options
author | Sugandha Gupta <sugandha.gupta@ettus.com> | 2019-05-16 15:13:52 -0700 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-05-21 11:02:14 -0700 |
commit | 2f7f7c8d2d5d0bebd84618077e61e344c689f622 (patch) | |
tree | 48ae01936061e055b2c47633a8ac768fbdac6463 /host/lib/usrp | |
parent | 422b55f2bf0589324e8ac6d72107c0917a3f2490 (diff) | |
download | uhd-2f7f7c8d2d5d0bebd84618077e61e344c689f622.tar.gz uhd-2f7f7c8d2d5d0bebd84618077e61e344c689f622.tar.bz2 uhd-2f7f7c8d2d5d0bebd84618077e61e344c689f622.zip |
mpmd: image_loader: Add support for devices without fpga_type
This fixes fpga image loading for devices which not have SFP port
and hence no fpga_type e.g. E310.
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_image_loader.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_image_loader.cpp b/host/lib/usrp/mpmd/mpmd_image_loader.cpp index e0145bd4b..d5c7d3da9 100644 --- a/host/lib/usrp/mpmd/mpmd_image_loader.cpp +++ b/host/lib/usrp/mpmd/mpmd_image_loader.cpp @@ -169,9 +169,13 @@ static bool mpmd_image_loader(const image_loader::image_loader_args_t& image_loa }(); // generate_fpga_type lambda function UHD_LOG_TRACE("MPMD IMAGE LOADER", "FPGA type: " << fpga_type); - if (!dev_addr.has_key("product") or fpga_type == "") { + if (!dev_addr.has_key("product")) { throw uhd::runtime_error( "Found a device but could not auto-generate an image filename."); + } else if (fpga_type == "") { + return find_image_path( + str(boost::format("usrp_%s_fpga.bit") + % (boost::algorithm::to_lower_copy(dev_addr["product"])))); } else { return find_image_path( str(boost::format("usrp_%s_fpga_%s.bit") |