From 9d0cd8ebecbe7c2f04a57e951abbf9752bfa623b Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 24 Jul 2018 14:02:53 -0700 Subject: x300: Log git hash and compat number as debug message --- host/lib/usrp/x300/x300_impl.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'host/lib/usrp/x300') 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(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(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) -- cgit v1.2.3