diff options
Diffstat (limited to 'host/lib/usrp/b200/b200_impl.cpp')
-rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index 13bdc09b4..355d12d12 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -17,12 +17,13 @@ #include "b200_impl.hpp" #include "b200_regs.hpp" +#include <uhd/config.hpp> #include <uhd/transport/usb_control.hpp> #include <uhd/utils/msg.hpp> #include <uhd/utils/cast.hpp> #include <uhd/exception.hpp> #include <uhd/utils/static.hpp> -#include <uhd/utils/images.hpp> +#include <uhd/utils/paths.hpp> #include <uhd/utils/safe_call.hpp> #include <uhd/usrp/dboard_eeprom.hpp> #include <boost/format.hpp> @@ -109,13 +110,11 @@ static device_addrs_t b200_find(const device_addr_t &hint) //extract the firmware path for the b200 std::string b200_fw_image; try{ - b200_fw_image = find_image_path(hint.get("fw", B200_FW_FILE_NAME)); + b200_fw_image = hint.get("fw", B200_FW_FILE_NAME); + b200_fw_image = uhd::find_image_path(b200_fw_image, STR(UHD_IMAGES_DIR)); // FIXME } - catch(...){ - UHD_MSG(warning) << boost::format( - "Could not locate B200 firmware.\n" - "Please install the images package. %s\n" - ) % print_images_error(); + catch(uhd::exception &e){ + UHD_MSG(warning) << e.what(); return b200_addrs; } UHD_LOG << "the firmware image: " << b200_fw_image << std::endl; @@ -783,11 +782,11 @@ void b200_impl::check_fw_compat(void) if (compat_major != B200_FW_COMPAT_NUM_MAJOR){ throw uhd::runtime_error(str(boost::format( - "Expected firmware compatibility number 0x%x, but got 0x%x.%x:\n" + "Expected firmware compatibility number %d.%d, but got %d.%d:\n" "The firmware build is not compatible with the host code build.\n" "%s" - ) % int(B200_FW_COMPAT_NUM_MAJOR) % compat_major % compat_minor - % print_images_error())); + ) % int(B200_FW_COMPAT_NUM_MAJOR) % int(B200_FW_COMPAT_NUM_MINOR) + % compat_major % compat_minor % print_utility_error("uhd_images_downloader.py"))); } _tree->create<std::string>("/mboards/0/fw_version").set(str(boost::format("%u.%u") % compat_major % compat_minor)); @@ -804,11 +803,10 @@ void b200_impl::check_fpga_compat(void) if (compat_major != B200_FPGA_COMPAT_NUM){ throw uhd::runtime_error(str(boost::format( - "Expected FPGA compatibility number 0x%x, but got 0x%x.%x:\n" + "Expected FPGA compatibility number %d, but got %d:\n" "The FPGA build is not compatible with the host code build.\n" "%s" - ) % int(B200_FPGA_COMPAT_NUM) % compat_major % compat_minor - % print_images_error())); + ) % int(B200_FPGA_COMPAT_NUM) % compat_major % print_utility_error("uhd_images_downloader.py"))); } _tree->create<std::string>("/mboards/0/fpga_version").set(str(boost::format("%u.%u") % compat_major % compat_minor)); |