aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2012-10-09 15:03:54 -0700
committerJosh Blum <josh@joshknows.com>2012-10-10 13:29:12 -0700
commit01d90259772520e555de4eacedd33aeebf51fa45 (patch)
tree676d5ed1751db31bccc2af3afaa45a59721eff46 /host/lib
parentadffee268c57c070ea1ed631a94c24975d0a40ae (diff)
downloaduhd-01d90259772520e555de4eacedd33aeebf51fa45.tar.gz
uhd-01d90259772520e555de4eacedd33aeebf51fa45.tar.bz2
uhd-01d90259772520e555de4eacedd33aeebf51fa45.zip
utils: USRP N2XX Simple Net Burner
* More automated C++ implementation of usrp_n2xx_net_burner.py * By default, installs images from standard image install directories
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.cpp7
-rw-r--r--host/lib/utils/images.cpp2
2 files changed, 4 insertions, 5 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp
index f0b2a90a6..8804433e7 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.cpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.cpp
@@ -410,8 +410,7 @@ public:
const std::string ml = "\\\n ";
#endif
- //create the images downloader and burner commands
- const std::string images_downloader_cmd = str(boost::format("%s\"%s\"") % sudo % find_images_downloader());
+ //create the burner commands
if (this->get_rev() == USRP2_REV3 or this->get_rev() == USRP2_REV4){
const std::string card_burner = (fs::path(fw_image_path).branch_path().branch_path() / "utils" / "usrp2_card_burner.py").string();
const std::string card_burner_cmd = str(boost::format("\"%s%s\" %s--fpga=\"%s\" %s--fw=\"%s\"") % sudo % card_burner % ml % fpga_image_path % ml % fw_image_path);
@@ -419,8 +418,8 @@ public:
}
else{
const std::string addr = _ctrl_transport->get_recv_addr();
- const std::string net_burner = (fs::path(fw_image_path).branch_path().branch_path() / "utils" / "usrp_n2xx_net_burner.py").string();
- const std::string net_burner_cmd = str(boost::format("\"%s\" %s--fpga=\"%s\" %s--fw=\"%s\" %s--addr=\"%s\"") % net_burner % ml % fpga_image_path % ml % fw_image_path % ml % addr);
+ const std::string net_burner_path = (fs::path(fw_image_path).branch_path().branch_path() / "utils" / "usrp_n2xx_simple_net_burner").string();
+ const std::string net_burner_cmd = str(boost::format("\"%s\" %s--addr=\"%s\"") % net_burner_path % ml % addr);
return str(boost::format("%s\n%s") % print_images_error() % net_burner_cmd);
}
}
diff --git a/host/lib/utils/images.cpp b/host/lib/utils/images.cpp
index 654e31179..251cadeaa 100644
--- a/host/lib/utils/images.cpp
+++ b/host/lib/utils/images.cpp
@@ -38,7 +38,7 @@ std::string uhd::find_image_path(const std::string &image_name){
fs::path image_path = path / image_name;
if (fs::exists(image_path)) return image_path.string();
}
- throw uhd::io_error("Could not find path for image: " + image_name);
+ throw uhd::io_error("Could not find path for image: " + image_name + "\n\n" + uhd::print_images_error());
}
std::string uhd::find_images_downloader(void){