aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/nirio/lvbitx
diff options
context:
space:
mode:
authorBen Hilburn <ben.hilburn@ettus.com>2015-01-27 16:07:43 -0800
committerBen Hilburn <ben.hilburn@ettus.com>2015-01-27 16:07:43 -0800
commit75d519706b9b0956307a6a4bdc53c36376f19f03 (patch)
treeb2d2144c31c3ea04167ef7e3d1b14f7477c158cf /host/lib/transport/nirio/lvbitx
parent8d0d0d01c0a2a5ed1a01da4360226a64ab8117bc (diff)
downloaduhd-75d519706b9b0956307a6a4bdc53c36376f19f03.tar.gz
uhd-75d519706b9b0956307a6a4bdc53c36376f19f03.tar.bz2
uhd-75d519706b9b0956307a6a4bdc53c36376f19f03.zip
Merging new UHD_IMAGES_DIR utilities and bug fixes.
Also includes NI-USRP Windows Registry Key fixes.
Diffstat (limited to 'host/lib/transport/nirio/lvbitx')
-rw-r--r--host/lib/transport/nirio/lvbitx/CMakeLists.txt7
-rw-r--r--host/lib/transport/nirio/lvbitx/template_lvbitx.cpp6
2 files changed, 5 insertions, 8 deletions
diff --git a/host/lib/transport/nirio/lvbitx/CMakeLists.txt b/host/lib/transport/nirio/lvbitx/CMakeLists.txt
index 35cfaa456..b9a2a9f15 100644
--- a/host/lib/transport/nirio/lvbitx/CMakeLists.txt
+++ b/host/lib/transport/nirio/lvbitx/CMakeLists.txt
@@ -27,7 +27,7 @@ MACRO(LIBUHD_LVBITX_GEN_SOURCE_AND_BITSTREAM lvbitx binfile)
ENDIF( ${binfile} STREQUAL "OFF" )
SET(OUTPUT_PATH_OPT --output-src-path=${CMAKE_CURRENT_BINARY_DIR})
- SET(IMAGES_PATH_OPT --uhd-images-path=${FPGA_IMAGES_DIR})
+ SET(IMAGES_PATH_OPT --uhd-images-path=${UHD_IMAGES_DIR})
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${lvbitxprefix}_lvbitx.hpp
@@ -53,11 +53,6 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
MESSAGE(STATUS "")
MESSAGE(STATUS "Processing NI-RIO FPGA LVBITX Bitstreams...")
-FILE(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/share/uhd/images default_images_dir)
-SET( FPGA_IMAGES_DIR ${default_images_dir} CACHE STRING "Path to installed FPGA image files." )
-OPTION( FPGA_IMAGES_DIR "Path to installed FPGA image files." "" )
-MESSAGE( STATUS " LVBITX install directory: ${FPGA_IMAGES_DIR}" )
-
# X300 Stuff
LIBUHD_LVBITX_GEN_SOURCE_AND_BITSTREAM(x300.lvbitx_base OFF)
diff --git a/host/lib/transport/nirio/lvbitx/template_lvbitx.cpp b/host/lib/transport/nirio/lvbitx/template_lvbitx.cpp
index a1899c771..8f1fb6b36 100644
--- a/host/lib/transport/nirio/lvbitx/template_lvbitx.cpp
+++ b/host/lib/transport/nirio/lvbitx/template_lvbitx.cpp
@@ -8,6 +8,7 @@
#include <boost/filesystem/path.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/regex.hpp>
+#include <uhd/utils/paths.hpp>
namespace uhd {{ namespace niusrprio {{
@@ -27,8 +28,9 @@ const char* {lvbitx_classname}_lvbitx::INPUT_FIFOS[] = {{{in_fifo_list}
{lvbitx_classname}_lvbitx::{lvbitx_classname}_lvbitx(const std::string& option)
{{
- boost::filesystem::path fpga_path(_get_fpga_images_dir(SEARCH_PATHS));
- fpga_path /= "usrp_{lvbitx_classname}_fpga_" + option + ".lvbitx";
+ std::string fpga_file = "usrp_{lvbitx_classname}_fpga_" + option + ".lvbitx";
+ boost::filesystem::path fpga_path(uhd::find_image_path(fpga_file, SEARCH_PATHS));
+
_fpga_file_name = fpga_path.string();
_bitstream_checksum = _get_bitstream_checksum(_fpga_file_name);
}}