aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils
Commit message (Collapse)AuthorAgeFilesLines
* uhd: mpm: apply clang-format to all filesBrent Stapleton2019-01-1619-2187/+2351
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applying formatting changes to all .cpp and .hpp files in the following directories: ``` find host/examples/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/tests/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/dboard/neon/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/dboard/magnesium/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/device3/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/mpmd/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/x300/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/utils/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find mpm/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file ``` Also formatted host/include/, except Cpp03 was used as a the language standard instead of Cpp11. ``` sed -i 's/ Cpp11/ Cpp03/g' .clang-format find host/include/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file ``` Formatting style was designated by the .clang-format file.
* examples: utils: skip formatting program optionsBrent Stapleton2019-01-1615-0/+30
| | | | | | Turning off clang formatting around the program option declarations. clang-format makes them looks bad an unreadable because it thinks the options are function calls or something.
* uhd: skip formatting misc arrays, maps, etc.Brent Stapleton2019-01-161-0/+2
| | | | | | Various data structures are nicely formatted to be human-readable. clang-format makes these structures harder to read, so we can skip formatting these sections.
* uhd: update cal utilities to support rhodiumMark Meserve2019-01-091-3/+6
|
* utils: Improve query_gpsdo_sensorsmichael-west2018-12-201-31/+28
| | | | | | | | | - Sets time source before checking ref_locked (E310 uses time source for PLL) - Checks for existence of "gpsdo" time and clock sources before setting - Only attempts to set them if they exist - Does not fall back on external sources - Returns with error if neither can be set to "gpsdo"
* responder: Better "abs()" compiler compatibilityMichael Dickens2018-12-122-2/+2
| | | | Use "std::abs" instead of "abs" for better compiler compatibility
* utils: specify the downloader's Python executableBrent Stapleton2018-11-261-1/+1
| | | | | | | | | | Change the uhd_images_downloader's first line to execute with a runtime Python interpreter, as determined at UHD build time. Users can still use an arbitrary Python executable by calling `python uhd_images_downloader` This will fix our embedded products by ensuring that we call Python3 when running uhd_images_downloader in embedded mode.
* utils: uhd_images_downloader: Add --http-proxy optionMartin Braun2018-11-161-2/+11
| | | | | | | | | | | | This lets the user specify a HTTP proxy. The environment variable HTTP_PROXY is still usable, but --http-proxy will override it. Example: $ uhd_images_downloader \ --http-proxy http://user:pass@10.20.30.40:3128 \ -t x310 Here, the tool will download all the images matching 'x310' using a proxy at 10.20.30.40.
* cmake: Update coding style to use lowercase commandsMartin Braun2018-11-142-71/+71
| | | | | | | | | | | | | | | | | Also updates our coding style file. Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code (with GNU compliant sed): cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done > convert.sed \ && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' \ '*CMakeLists.txt' | xargs -0 gsed -i -f convert.sed && rm convert.sed (Make sure the backslashes don't get mangled!)
* utils: Fix downloader return value for main()Martin Braun2018-11-131-7/+11
| | | | | | This is effectively a refactoring: The main() function now returns True on success. This fixes a bug where one branch would simply return (None) instead of returning a value.
* utils: Downloader stall on error for Windows usersMartin Braun2018-11-131-2/+30
| | | | | | | | | If platform.system() is 'Windows', the Python script will stall on error before terminating, e.g., when an import is missing or when an unexpected Exception occurred during the execution. The rationale is that many Windows users run this script directly, without a shell, and wouldn't have a way to see error messages from the script in that case.
* utils: uhd_images_downloader: Remove archive typeMartin Braun2018-11-131-28/+22
| | | | | | | Since the uhd_images_downloader is so tightly integrated into our infrastructure, we've dropped support for .tar.gz and .tar.xz file for this particular purpose. Note that UHD releases still receive images in all three formats.
* utils: uhd_images_downloader: Refactor the toolMartin Braun2018-11-131-115/+153
| | | | | No functional changes. The main effort was to reduce the length of main() and reduce the number of Pylint warnings.
* utils: Allow downloader to ship non-zip filesMartin Braun2018-11-131-5/+13
| | | | | | Note: All archives shipped using this tool are zip files. However, this allows us to ship other types of files, which will be downloaded and sorted into the images directory as-is.
* utils: uhd_images_downloader: Add download limitMartin Braun2018-11-131-1/+25
| | | | | | | | | | | | | | This download limit prevents users from accidentally downloading really large files. The default limit is 100 MiB. When a file is selected for download that exceeds this size, the user is prompted if she really wants to download that file. By specifying --yes (or -y), this can can be bypassed. Example: $ uhd_images_downloader --yes -t sdimg Will match all files that match 'sdimg', which are typically larger than 100 MiB, without interaction.
* utils: uhd_images_downloader: Add --yes optionMartin Braun2018-11-131-0/+25
| | | | | | | | | This will answer 'yes' to all questions that are asked and allows to script the downloader. Example: $ uhd_images_downloader -t sdimg -y Any interaction that the script will have with the user will be skipped.
* utils: add downloader printing fetchable URLsMartin Braun2018-11-131-12/+24
| | | | | | | | | | | | | | Running $ uhd_images_downloader -l will now print the full URL of the target. By specifying $ uhd_images_downloader -l --url-only It will *only* print the URLs, nothing else, making this suitable for scripting. The list will always go to stdout, whereas the logging is going to stderr and thus can easily be siphoned off.
* utils: Make uhd_images_downloader log to stderrMartin Braun2018-11-131-2/+2
|
* utils: Factor wait_for_lo_lock() out of cal utilsMartin Braun2018-08-294-24/+19
|
* uhd: utils: Add Zip test to downloaderBrent Stapleton2018-08-281-2/+15
| | | | | Users can supply the --test/-T option to test the downloaded archive before extracting it, using the Python zipfile.testzip() function.
* uhd: utils: Downloader logs no targets selectedBrent Stapleton2018-08-281-0/+5
| | | | | uhd_images_downloader: Adding INFO message when there is no target selected to download, as when the user misspells a target name.
* utils: fixup for downloader inventory managementBrent Stapleton2018-08-211-12/+19
| | | | | | | | uhd_images_downloader was mismanaging the image inventory- image packages entries were not being deleted when the images were overwritten. Now, each target is saved as a single entry in the inventory, which is overwritten when a new image package is downloaded.
* lib: Purge all references to boost::this_thread::sleep()Martin Braun2018-04-305-11/+18
| | | | Replace with std::this_thread::sleep_for().
* utils: fix 30s timeout in query_gpsdo_sensorsTrung N Tran2018-04-301-7/+12
|
* cal_utils: logic to handle eventual U's during calibrationNicolas Cuervo2018-04-184-22/+99
| | | | | For every frequency point, the cal utils will detect underruns and retry a calibration measurement up to 10 times before failing.
* cmake: Improve warning for missing requestsMartin Braun2018-03-281-1/+2
|
* docs: Purged stray references to register_handlerMartin Braun2018-03-191-3/+0
| | | | | This is a no-longer-supported API call from before the logging API restructuring.
* utils: downloader supports multiple RegExsBrent Stapleton2018-03-161-6/+9
| | | | | | | | | | | | uhd_images_downloader now accepts multiple '--types' options, each of which is a RegEx. Targets which match to all of the provided `types` are downloaded. Example usage: `uhd_images_downloader -t n3xx -t fpga` will match the following targets: - n3xx_n310_fpga_default - n3xx_n310_fpga_aurora - n3xx_n300_fpga_default
* utils: Adding option to skip SHA in downloaderBrent Stapleton2018-03-161-7/+12
| | | | | | Targets in the manifest with SHA256 values of '0' will not be verified. This will allow us to skip the verification for certain image packages (ie. the filesystem).
* utils: fixup for downloader SHA256 checkBrent Stapleton2018-03-161-2/+7
| | | | The image package is not unzipped or kept if the SHA256 checksum fails
* uhd: Move internal headers to uhdlib/Martin Braun2018-03-141-0/+1
| | | | | | | | | | | | | | | | To avoid the proliferation of additional include directories and multiple ways of including project-local headers, we now default to moving all headers that are used across UHD into the uhdlib/ subdirectory. Some #include statements were also reordered as they were modified for closer compliance with the coding guidelines. Internal cpp source files should now include files like this: #include <uhdlib/rfnoc/ctrl_iface.hpp> Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com>
* utils: Removed deprecated utilitiesMartin Braun2018-03-055-362/+1
| | | | | | This removes all the tools that have been declared deprecated for a while. No functionality is removed, all utilities have a separate equivalent, e.g., with uhd_image_loader.
* mpm: uhd: RPC server reports MPM version, uhd_usrp_probe reads itMartin Braun2018-03-021-0/+3
|
* utils: Skip progress bars for non-tty outputsMartin Braun2018-03-011-1/+5
|
* utils: Reenable UHD_IMAGES_DIR env var for uhd_images_downloaderMartin Braun2018-03-011-3/+11
| | | | | | This was forgotten in the transition to the new downloader. The command line options --install-location will still override the env variable if it exists.
* utils: Increase verbosity on uhd_images_downloaderMartin Braun2018-03-011-6/+4
|
* cmake: force cmake to regenerate uhd_images_downloader.pyTrung N Tran2018-02-271-0/+8
| | | | ... when manifest.txt changed.
* Revert "utils: images downloader: forced update of CMake variable"Trung N Tran2018-02-271-10/+5
| | | | This reverts commit cf1bf696649c958c53d7f4cf0a280242c254e4be.
* examples: Fix some minor compiler warningsMartin Braun2018-02-192-3/+3
| | | | All warnings reported by MSVC. Mostly related to narrowing conversions.
* uhd: Update license headersMartin Braun2018-02-1935-32/+65
| | | | | | | All copyright is now attributed to "Ettus Research, a National Instruments company". SPDX headers were also updated to latest version 3.0.
* utils: images downloader: adding SHA256 supportBrent Stapleton2018-02-151-6/+15
| | | | | Adding SHA256 checking for downloaded image archives. The expected SHA is read from the manifest, and checked after the download completes.
* utils: images downloader: adding --keep supportBrent Stapleton2018-02-151-4/+6
| | | | | When users supply the --keep argument, image archives are saved in the images directory alongside the image files.
* utils: Use find_all in uhd_find_devicesMartin Braun2018-02-071-4/+19
| | | | | | This enables finding all N310 devices, even if they're not available Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
* utils: images downloader: default download printBrent Stapleton2018-02-071-3/+5
| | | | | | | | Adding a message at the INFO log level (the default) to tell users that downloads have begun. Also added the filename being downloaded to the progress bars. Reviewed-by: Martin Braun <martin.braun@ettus.com>
* utils: images downloader: adding dry run optionBrent Stapleton2018-02-031-17/+23
| | | | | | Command line argument --dry-run is now available. This runs through the downloader without actually downloading any files or editing the inventory file.
* utils: Fix query_gpsdo_sensors so it works for TCXO on B200michael-west2018-02-011-0/+3
|
* utils: images downloader: forced update of CMake variableBrent Stapleton2018-01-291-5/+10
| | | | | | | | | Moved the uhd_images_downloader.py.in configuration to its own script so that the manifest file is added as a dependency and read into a CMake variable. Reviewed-by: Ashish Chaudhari <ashish@ettus.com> Reviewed-by: Martin Braun <martin.braun@ettus.com>
* utils: refactor uhd_images_downloaderBrent Stapleton2018-01-232-333/+325
| | | | | | | | | | | | | | | | | Changing structure of the files.ettus.com images directory, and updating uhd_images_downloader correspondingly. The images downloader now downloads a number of smaller archives of images, instead of one large archive containing all of our images. Furthermore, the images downloader maintains an inventory of currently installed images, so that images are not redownloaded unnecessarily. When called with no arguments, behavior should not change. CMake variables are used to populate a number of fields in the images downloader, including the contents of the manifest file. Reviewed-by: Martin Braun <martin.braun@ettus.com> Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com>
* Move all license headers to SPDX format.Martin Braun2017-12-2235-420/+35
|
* uhd: Removed drivers for E100/E110Martin Braun2017-09-291-5/+0
| | | | The E1x0 series is still supported on the 3.9 LTS branch.