This adds two tools to the ./tools/ subdirectory:
== clang-formatter.sh ==
This is simply a small shell script that can be executed from the top of
the UHD repository, and it will format all files according the the
.clang-format file. It can be executed as such:
$ CLANG_FORMAT=clang-format-14 ./tools/clang-formatter.sh apply
Specifying a clang-format executable is optional, but note that
clang-format 14.0 should be used.
== run-clang-format.py ==
This is a Python script that is a modified version from
https://github.com/gnuradio/clang-format-lint-action/blob/ \
0b0cb14cf220a070d2a8b2610bd74ad1546252a1/run-clang-format.py
It was modified to add --patch-file option.
Alongside this file is a .clang-format-ignore file, which is sourced
from this script. The command can be run as such:
$ ./tools/run-clang-format.py \
--clang-format-executable clang-format-14 \
--extensions c,cpp,h,hpp,hpp.in,ipp \
-r \
--patch-file format.patch \
/path/to/uhd-repo
It will provide both a nice output summary as well as a patch file that
can be consumed with `patch -p0 < format.patch`.
|
||
|---|---|---|
| .. | ||
| debs | ||
| dissectors | ||
| kitchen_sink | ||
| mega_fft | ||
| nirio_programmer | ||
| uhd_dump | ||
| uhd_txrx_debug_prints | ||
| usrptest | ||
| changeset_testlist.py | ||
| changeset_testlist.yaml | ||
| clang-formatter.sh | ||
| json_to_zbx_dsa_cal.py | ||
| package_source.sh | ||
| README.md | ||
| run-clang-format.py | ||
| usrp_x3xx_fpga_jtag_programmer.sh | ||
USRP™ Tools
This folder contains tools that are useful for working with and/or debugging your USRP™ device. Tools in this directory are not part of UHD. They are either stand-alone programs or software to be used in third-party applications.
For UHD™ software tools, look in uhd/host/utils.
List of Tools
__chdr-dissector/__
This is a packet dissector for Wireshark. It allows you to view the details of a Compressed HeaDeR (CHDR) formatted-packet in Wireshark. The USRP™ B2xx and X3xx use the CHDR format.
__uhd_dump/__
This tool can be used with tcpdump to make sense of packet dumps from your
network-connected USRP™ device.
__usrp_x3xx_fpga_jtag_programmer.sh__
This tool is to be used with the USRP™ X300 and X310 devices. It allows you to
program the X3x0 FPGA via JTAG. Note that loading the FPGA image via JTAG does
not store the FPGA in the on-device flash storage. Thus, as soon as you
cycle power, the image will be lost. To permanently burn an FPGA image, please
refer to uhd/host/utils/usrp_x3xx_fpga_burner.
This tool requires that Xilinx iMPACT has been installed on your system.
__kitchen_sink__
This is a debugging tool designed to test and stress connections to USRP devices.