aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2015-12-15 15:17:36 -0800
committerAshish Chaudhari <ashish@ettus.com>2015-12-15 15:17:36 -0800
commitf44f7f2ca7dbbd1a72f5b3d239856a1954569884 (patch)
tree310055d734a28063359b26f7cdc4d4704c517b9e /host/utils
parent75ea07bd6d19494e018cd5c3109e1f85969b7ac6 (diff)
parent10178875a154e58af6c14774621776d13e7e3daa (diff)
downloaduhd-f44f7f2ca7dbbd1a72f5b3d239856a1954569884.tar.gz
uhd-f44f7f2ca7dbbd1a72f5b3d239856a1954569884.tar.bz2
uhd-f44f7f2ca7dbbd1a72f5b3d239856a1954569884.zip
Merge branch 'maint'
Conflicts: host/lib/usrp/b200/b200_impl.hpp host/lib/usrp/e300/e300_fpga_defs.hpp host/lib/usrp/x300/x300_fw_common.h
Diffstat (limited to 'host/utils')
-rw-r--r--host/utils/CMakeLists.txt3
-rw-r--r--host/utils/b2xx_fx3_utils.cpp5
-rw-r--r--host/utils/octoclock_firmware_burner.cpp22
-rw-r--r--host/utils/uhd-usrp.rules1
4 files changed, 9 insertions, 22 deletions
diff --git a/host/utils/CMakeLists.txt b/host/utils/CMakeLists.txt
index 1ea86f2cc..9ab95596d 100644
--- a/host/utils/CMakeLists.txt
+++ b/host/utils/CMakeLists.txt
@@ -91,10 +91,9 @@ IF(ENABLE_OCTOCLOCK)
SET(octoclock_burner_sources
octoclock_firmware_burner.cpp
- ${CMAKE_SOURCE_DIR}/lib/usrp_clock/octoclock/kk_ihex_read.c
+ ${CMAKE_SOURCE_DIR}/lib/utils/ihex.cpp
)
- ADD_DEFINITIONS(-DIHEX_USE_STDBOOL)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/usrp_clock/octoclock)
ADD_EXECUTABLE(octoclock_firmware_burner ${octoclock_burner_sources})
TARGET_LINK_LIBRARIES(octoclock_firmware_burner uhd ${Boost_LIBRARIES})
diff --git a/host/utils/b2xx_fx3_utils.cpp b/host/utils/b2xx_fx3_utils.cpp
index a3eaf862a..a6896c868 100644
--- a/host/utils/b2xx_fx3_utils.cpp
+++ b/host/utils/b2xx_fx3_utils.cpp
@@ -52,7 +52,8 @@ const static vid_pid_t known_vid_pids[] = {
{FX3_VID, FX3_DEFAULT_PID},
{FX3_VID, FX3_REENUM_PID},
{B200_VENDOR_ID, B200_PRODUCT_ID},
- {B200_VENDOR_ID, B205_PRODUCT_ID},
+ {B200_VENDOR_ID, B200MINI_PRODUCT_ID},
+ {B200_VENDOR_ID, B205MINI_PRODUCT_ID},
{B200_VENDOR_NI_ID, B200_PRODUCT_NI_ID},
{B200_VENDOR_NI_ID, B210_PRODUCT_NI_ID}
};
@@ -175,7 +176,7 @@ uhd::transport::usb_device_handle::sptr open_device(const boost::uint16_t vid, c
vp = known_vid_pid_vector[i];
handles = uhd::transport::usb_device_handle::get_device_list(vp.vid, vp.pid);
}
-
+
}
if (handles.size() > 0)
diff --git a/host/utils/octoclock_firmware_burner.cpp b/host/utils/octoclock_firmware_burner.cpp
index c338cd818..326985df5 100644
--- a/host/utils/octoclock_firmware_burner.cpp
+++ b/host/utils/octoclock_firmware_burner.cpp
@@ -42,7 +42,7 @@
#include <uhd/utils/safe_main.hpp>
#include "../lib/usrp_clock/octoclock/common.h"
-#include "kk_ihex_read.h"
+#include "../lib/utils/ihex.hpp"
#define MAX_FIRMWARE_SIZE 1024*120
#define BLOCK_SIZE 256
@@ -142,7 +142,7 @@ device_addrs_t bootloader_find(const std::string &ip_addr){
device_addrs_t addrs;
boost::system_time comm_timeout = boost::get_system_time() + boost::posix_time::milliseconds(3000);
-
+
while(boost::get_system_time() < comm_timeout){
UHD_OCTOCLOCK_SEND_AND_RECV(udp_transport, OCTOCLOCK_QUERY_CMD, pkt_out, len, octoclock_data);
if(UHD_OCTOCLOCK_PACKET_MATCHES(OCTOCLOCK_QUERY_ACK, pkt_out, pkt_in, len) and
@@ -292,22 +292,8 @@ void finalize(udp_simple::sptr udp_transport){
}
void octoclock_convert_ihex(const std::string &hex_path, const std::string &bin_path){
- struct ihex_state ihex;
- ihex_count_t count;
- char buf[256];
- FILE* infile = fopen(hex_path.c_str(), "r");
- FILE* outfile = fopen(bin_path.c_str(), "w");
- uint64_t line_number = 1;
-
- ihex_begin_read(&ihex);
- while(fgets(buf, 256, infile)){
- count = ihex_count_t(strlen(buf));
- ihex_read_bytes(&ihex, buf, count, outfile);
- line_number += (count && buf[count - 1] == '\n');
- }
- ihex_end_read(&ihex, outfile); // Closes outfile
-
- (void)fclose(infile);
+ ihex_reader hex_reader(hex_path);
+ hex_reader.to_bin_file(bin_path);
}
int UHD_SAFE_MAIN(UHD_UNUSED(int argc), UHD_UNUSED(char *argv[])){
diff --git a/host/utils/uhd-usrp.rules b/host/utils/uhd-usrp.rules
index e10c86f13..76bccfefa 100644
--- a/host/utils/uhd-usrp.rules
+++ b/host/utils/uhd-usrp.rules
@@ -24,5 +24,6 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="2500", ATTRS{idProduct}=="0002", MODE:="066
#B200
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2500", ATTRS{idProduct}=="0020", MODE:="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2500", ATTRS{idProduct}=="0021", MODE:="0666"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="2500", ATTRS{idProduct}=="0022", MODE:="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="3923", ATTRS{idProduct}=="7813", MODE:="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="3923", ATTRS{idProduct}=="7814", MODE:="0666"