aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-08-31 13:08:50 -0700
committerJosh Blum <josh@joshknows.com>2010-08-31 13:08:50 -0700
commit80fe3189afd52d1aab95ee95e71d5d50bddbba55 (patch)
tree963ba0d869cf55a0909e1bdb80000035d3f5f0a0
parentc9cd9b605897078daed77c8b7f9c538cb77bd4bc (diff)
downloaduhd-80fe3189afd52d1aab95ee95e71d5d50bddbba55.tar.gz
uhd-80fe3189afd52d1aab95ee95e71d5d50bddbba55.tar.bz2
uhd-80fe3189afd52d1aab95ee95e71d5d50bddbba55.zip
usrp1: Fedora sdcc note and change fw error to warning (find should not error)
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.cpp17
-rw-r--r--images/README5
2 files changed, 19 insertions, 3 deletions
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp
index ccb41a09d..9f824045d 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.cpp
@@ -22,6 +22,7 @@
#include <uhd/transport/usb_control.hpp>
#include <uhd/usrp/device_props.hpp>
#include <uhd/usrp/mboard_props.hpp>
+#include <uhd/utils/warning.hpp>
#include <uhd/utils/assert.hpp>
#include <uhd/utils/static.hpp>
#include <uhd/utils/images.hpp>
@@ -50,9 +51,19 @@ static device_addrs_t usrp1_find(const device_addr_t &hint)
if (hint.has_key("type") and hint["type"] != "usrp1") return usrp1_addrs;
//extract the firmware path for the USRP1
- std::string usrp1_fw_image = find_image_path(
- hint.has_key("fw")? hint["fw"] : "usrp1_fw.ihx"
- );
+ std::string usrp1_fw_image;
+ try{
+ usrp1_fw_image = find_image_path(
+ hint.has_key("fw")? hint["fw"] : "usrp1_fw.ihx"
+ );
+ }
+ catch(const std::exception &e){
+ uhd::print_warning(
+ "Could not locate USRP1 firmware.\n"
+ "Please install the images package.\n"
+ );
+ return usrp1_addrs;
+ }
std::cout << "USRP1 firmware image: " << usrp1_fw_image << std::endl;
//see what we got on the USB bus
diff --git a/images/README b/images/README
index ec8391826..2f9c6a95e 100644
--- a/images/README
+++ b/images/README
@@ -18,3 +18,8 @@ To build the package (unix):
The package generator types are described here:
http://www.cmake.org/Wiki/CMake:CPackPackageGenerators
+
+Fedora note:
+ The sdcc binaries are prefixed with "sdcc-" which breaks the build.
+ However, /usr/libexec/sdcc contains properly named sdcc binaries.
+ export PATH=${PATH}:/usr/libexec/sdcc