aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-07-24 14:02:53 -0700
committerBrent Stapleton <bstapleton@g.hmc.edu>2018-08-01 09:34:38 -0700
commit9d0cd8ebecbe7c2f04a57e951abbf9752bfa623b (patch)
treebcd4771e42225a737c18a36b59eb74c90dbee6df /host/lib
parent0d45bda1c4d6d84c3e8c98690b868d218fe996eb (diff)
downloaduhd-9d0cd8ebecbe7c2f04a57e951abbf9752bfa623b.tar.gz
uhd-9d0cd8ebecbe7c2f04a57e951abbf9752bfa623b.tar.bz2
uhd-9d0cd8ebecbe7c2f04a57e951abbf9752bfa623b.zip
x300: Log git hash and compat number as debug message
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/x300/x300_impl.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp
index d0915d592..069adfe73 100644
--- a/host/lib/usrp/x300/x300_impl.cpp
+++ b/host/lib/usrp/x300/x300_impl.cpp
@@ -1812,10 +1812,15 @@ void x300_impl::check_fpga_compat(const fs_path &mb_path, const mboard_members_t
const uint32_t git_hash = members.zpu_ctrl->peek32(SR_ADDR(SET0_BASE,
ZPU_RB_GIT_HASH));
- _tree->create<std::string>(mb_path / "fpga_version_hash").set(
- str(boost::format("%07x%s")
+ const std::string git_hash_str = str(
+ boost::format("%07x%s")
% (git_hash & 0x0FFFFFFF)
- % ((git_hash & 0xF0000000) ? "-dirty" : "")));
+ % ((git_hash & 0xF0000000) ? "-dirty" : "")
+ );
+ _tree->create<std::string>(mb_path / "fpga_version_hash").set(git_hash_str);
+ UHD_LOG_DEBUG("X300",
+ "Using FPGA version: " << compat_major << "." << compat_minor
+ << " git hash: " << git_hash_str);
}
x300_impl::x300_mboard_t x300_impl::get_mb_type_from_pcie(const std::string& resource, const std::string& rpc_port)