Commit graph

299 commits

Author SHA1 Message Date
Ryan Tucker
c63143391b generate.bash: gracefully handle pandoc failures 2016-02-14 14:11:56 -05:00
Jon Szymaniak
e472cde71d bladeRF-cli: Added newline in firmware loading text 2016-01-16 15:23:58 -05:00
Jon Szymaniak
74bc5e9657 bladeRF-cli: Addressed build issues cause by endianess macros
Use CONST variants of macros when assigning constants.

For values that are not constants, the declaration and assignments
have been separated just to avoid any potential future C89
shenanigans.
2016-01-11 23:38:02 -05:00
Jon Szymaniak
5d4e16725f bladeRF-cli: Addressed warning from GCC -Os in rxtx.c
host/utilities/bladeRF-cli/src/cmd/rxtx.c:753:8: error: ‘status’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     if (status == ETIMEDOUT) {
        ^

Initialize state of `status` to CLI_RET_UNKNOWN.
2016-01-04 09:58:28 -05:00
Jon Szymaniak
6822782cde bladeRF-cli: Addressed warnings from GCC -Os in printset.c
host/utilities/bladeRF-cli/src/cmd/printset.c:601:12: error: ‘lut_len’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     size_t lut_len;
            ^
host/utilities/bladeRF-cli/src/cmd/printset.c:600:31: error: ‘lut’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     const struct xb_gpio_lut *lut;
                               ^
host/utilities/bladeRF-cli/src/cmd/printset.c:642:12: error: ‘lut_len’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     size_t lut_len, i;
            ^

Default lut_len to 0 and perform a sanity checks on lut & lut_len.
2016-01-04 09:58:28 -05:00
Jon Szymaniak
cb74dca267 bladeRF-cli: Addressed warning from GCC -Os in poke.c
bladeRF/host/utilities/bladeRF-cli/src/cmd/poke.c:97:20: error: ‘f’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
             status = f( state->dev, (uint8_t)address, (uint8_t)value );
                    ^

Initialize f to NULL to calm GCC. In the cases where f is not assigned,
we should be erroring out at line 91. NULL check is performed on line
96.
2016-01-04 09:58:10 -05:00
Jon Szymaniak
8c250d6440 bladeRF-cli: Added important details to jump_to_boot help text 2015-12-28 23:21:19 -05:00
Jon Szymaniak
2d166cb2c2 bladeRF-cli: Note 'set frequency <value>' deprecation
Lead users away from using this shorthand in favor of setting
modules individually. This is intended to help avoid cases where
users see PLL artifacts, despite not actually needing modules
tuned to the same frequency.
2015-12-28 23:00:14 -05:00
Jon Szymaniak
aa581fb301 bladeRF-cli: Fixed typo in cal help text 2015-12-28 22:46:49 -05:00
Jon Szymaniak
1154ef7bd9 bladeRF-cli: Use DC calibration routines from host/common
Calibration and DC table generation now utilize the routines found
in host/common.

Although these do take noticably longer to execute, they generally yield
better results than the prior implementation.
2015-12-28 22:29:04 -05:00
Jon Szymaniak
9ea16c4e3e bladeRF-cli: Added fw_log command
This command allows the FX3 firmware's log buffer to be read
to a file.
2015-12-28 16:10:39 -05:00
Jon Szymaniak
35ff2e5d25 bladeRF-cli: Corrected formatting of VCTCXO tamer mode state 2015-12-14 15:29:59 -05:00
Jon Szymaniak
4b2845ca16 bladeRF-cli: Print readback of VCTCXO tamer mode after setting it 2015-12-14 15:29:59 -05:00
Jon Szymaniak
347613e858 bladeRF-cli: Typo fix for 'set vctcxo_tamer disabled' 2015-12-14 15:29:59 -05:00
Jon Szymaniak
44af654b12 bladeRF-cli: Added print/set support for VCTCXO tamer 2015-12-14 15:29:59 -05:00
Jon Szymaniak
5a0e973c0b bladeRF-cli: Address CID1320428 (unchecked return value)
This is intentional.
2015-12-14 14:24:47 -05:00
Jon Szymaniak
7416fb5ae1 bladeRF-cli: Added print/set rx_mux
This addition allows users to inspect and control the
state of the FPGA RX FIFO input mux.
2015-12-09 23:35:23 -05:00
Jon Szymaniak
b83f5276cc bladeRF-cli: Re-added missing 'set xb_gpio[_dir] reg[ister]' support
This regression was introduced around 2015-09-01 when I added support
for accessing individual pins. Support for setting the XB GPIO via
the full register word was intended to be retained, but was not.

This commit re-adds this functionality.
2015-11-06 17:38:25 -05:00
Jon Szymaniak
9b67b91d2b bladeRF-cli: Fixed typo in 'set xb_gpio_dir' usage message 2015-11-06 16:50:19 -05:00
Jon Szymaniak
8ec3f65757 bladeRF-cli: Added more explicit output for BLADERF_ERR_NODEV conditions 2015-10-08 15:49:26 -04:00
Jon Szymaniak
26aaf257f7 bladeRF-cli: Consider fractional samplerate portion for Hi-Speed warning 2015-10-08 12:48:55 -04:00
Jon Szymaniak
6ad132b9d8 bladeRF-cli: Cleaned up error messages in 'set samplerate' 2015-10-08 12:48:55 -04:00
Jon Szymaniak
7a6b983f5f bladeRF-cli: Allow samplerate integer to be zero
This allows rates to be specified via the numerator and denominator
only. For example, to specify Fs = (4.5*684*1e6) / 286

set samplerate rx 0 3078000000 286
2015-10-08 12:48:55 -04:00
Jon Szymaniak
77e913161f bladeRF-cli: Use uint64 conversions when setting sample rate 2015-10-08 12:48:55 -04:00
Brian Padalino
01940e6ebd libbladeRF: Adding ability to set SMB frequency.
Adding the ability to set the SMB frequency when in MIMO master mode.
Also fix a bug where attaching the xb200 and setting MIMO master
would turn off the other clock not allowing an xb200 enabled device
to ever be a master clock supplier.

Being able to set the master frequency is useful when you want to
lock test equipment to the bladeRF oscillator.
2015-09-09 18:34:51 -04:00
Adam Greig
f7f26d5bb7 Add support for setting SMB clock output to arbitrary frequency 2015-09-09 17:58:41 -04:00
Jon Szymaniak
4be58b1b07 bladeRF-cli: Fixed duplicate code blocks (CID 1321689) 2015-09-01 17:21:33 -04:00
Jon Szymaniak
12ebcb3c13 bladeRF-cli: Show values after 'set' and made whitespace more consistent 2015-09-01 15:47:56 -04:00
Jon Szymaniak
e3758691d0 bladeRF-cli: Updated 'print/set [xb_gpio | xb_gpio_dir]' for pin-based access 2015-09-01 14:51:50 -04:00
Jon Szymaniak
43269aac57 bladeRF-cli: Check file write access before kicking off table generation 2015-08-25 15:49:03 -04:00
Jon Szymaniak
ed805993b5 bladeRF-cli: Added return code for insufficient permissions
This should help clarify the cause of file-related errors in
cases where folks are trying to rx into a location where they
do not have write permissions.
2015-08-25 14:52:55 -04:00
Jon Szymaniak
a6aea0905c bladeRF-cli: Updated help text items
Updated 'print' to note that all parameters are now printed when
no arguments are provided.

Adjusted print and set widths to yield the same formatting in the
bladeRF-cli help output. (Closes #422)

Added help text entries for xb_* commands. (Closes #423)
2015-08-23 03:34:43 -04:00
Jon Szymaniak
08f69c7822 bladeRF-cli: Cleaned up 'print' formatting
Various items supported by 'print' have been made a bit more
consistent in terms of spacing.

Units have been separated from numbers, as typically recommended by
NIST.

Some options have been added to the printset_table to specify how
to group items when printing all of them (and to skip items).
2015-08-23 03:03:57 -04:00
Martin Murray
aeb78b3984 bladeRF-cli: 'print' with no arguments now prints all available values
The print command invoked without arguments in bladeRF-cli
is modified to invoke all the print/set parameter
handlers in order. Old behavior was to display usage note.

The leading and trailing cosmetic newlines were moved from the
individual printset handlers to cmd_print() to allow for a concise
table.

Original usage information is still available via help command.
2015-08-23 02:41:34 -04:00
Jon Szymaniak
68c33907af bladeRF-cli: Created cli_err() variant without added newlines 2015-08-23 02:41:34 -04:00
Jon Szymaniak
24f2cda363 bladeRF-cli: Fixed unchecked return value 2015-08-12 14:43:29 -04:00
Jon Szymaniak
ab441d15cb bladeRF-cli: Fixed errors and inconsistencies in interactive help text 2015-07-15 22:26:23 -04:00
Jon Szymaniak
c2b3881a50 bladeRF-cli: Flush zero samples through the device at the end of a TX
When the file to TX does not have any sort of "padding" zero samples
at the end, there's a risk that we'll turn off the TX front-end
before the samples are actually transmitted.

As a "quick and dirty" solution, we just flush (num_buffers + 1)
buffers worth of 0+0j after completing the TX of the file.
2015-07-09 11:17:51 -04:00
Jon Szymaniak
7ff879ff44 bladeRF-cli: Added 'print trimdac' support 2015-06-23 23:12:04 -04:00
Jon Szymaniak
07e64a8a53 bladeRF-cli: Remove unneeded casts 2015-06-21 22:53:40 -04:00
Jon Szymaniak
0a71588c9c bladeRF-cli: Fixed error code translation issue
libbladeRF error codes were being treated as CLI error codes,
resulting in confusing messages on misbehaving hardware.
2015-05-22 13:48:02 -04:00
Jon Szymaniak
2dbc1c8521 bladeRF-cli: Added some comments to input processing loop 2015-05-02 14:44:22 -04:00
Jon Szymaniak
41f7cc1793 bladeRF-cli: Removed redundant logic 2015-05-02 14:44:22 -04:00
Jon Szymaniak
bc1f6f2106 bladeRF-cli: Moved and modified logic to split up line with delimiters
Moved this logic to zeroize_next_delimeter() to improve readability.

This has also been changed to remove the use of an unnecessary
variable-length array, which would cause build failures with
some compilers (e.g., MSVC).
2015-05-02 14:44:19 -04:00
Jens Elofsson
b6ba3b20d6 bladeRF-cli: Can now specify multiple commands, separated by ';' 2015-05-02 13:22:23 -04:00
Jon Szymaniak
7082cdd5c8 bladeRF-cli: Updated copyright date on generated help text 2015-02-17 11:23:04 -05:00
Michael Ambrus
89612e7dc3 bladeRF-cli: Improved robustness of help text generator
generate.bash uses pandoc to generate both documentation and code from a
markdown document. For code, pandoc is also used as an intermediate
step, but the pandoc format varies between versions 1.12.x and 1.13.x.

These changes handle this format change and introduce some additional
improvements to make the script more resilient to format changes.
2015-02-17 11:22:59 -05:00
Jon Szymaniak
9039ccacd8 bladeRF-cli: Added additional bit definitions for 'peek lms'
In more recent LMS docs, SPARE bits have become documented. These
changes are based upon the LMS6002 Programming and Calibration Guide
(rev 1.4 2013-06-11)
2015-01-23 15:22:40 -05:00
Jon Szymaniak
c3761293c7 bladeRF-cli: Touched up help text for 'info' command 2014-12-19 10:50:56 -05:00
Jon Szymaniak
13668758b3 bladeRF-cli: Inform user if bootloader devices are present
Before attempting to open any devices when going into interactive mode,
running a script, or executing "-e" arguments, bladeRF-cli now checks
for any FX3-based devices in bootloader mode, and alerts the user
to their presence, recommending that he or she see 'help recover'
for more information.

Previously, a libbladeRF log_info() message was used to alert users
to the presence of FX3-based devices enumerating in bootloader mode.
This was removed to alleviate noise and because it was buried in
backend-specific code.

Given that the bladeRF-cli is intended to be the "go to" program for
debugging the state of a bladeRF device, this alert is more
appropriately located in this program.
2014-12-19 10:50:56 -05:00