The buffer length used for calls to bladerf_sync_rx() is now determined
by the test case length, rather than the (unrelated) sync i/f buffer length.
This allows for the use of different sync i/f buffer lengths to be used
via -B.
When searching for FPGA bitstreams or other files, we should be
searching locations relative to the installation prefix.
In an effort to avoid breaking existing packaging scripts, the
previously used paths "/usr/share/Nuand/bladeRF" and
"/etc/Nuand/bladeRF" have been kept in the search list, but at a lower
priority than the items with the installation prefix.
With the existing settings, I had run into some "Input Overload"
errors on a VSA while using the tx_gmsk_bursts timestamp test.
The gains in use were rather hot; they've been reduced.
Addressed the following warnings though use of casts to larger stdint.h types
and inttypes.h format specifiers:
test_timestamps.c: In function ‘counter_data_is_valid’:
test_timestamps.c:99:21: warning: unknown conversion type character ‘l’ in format [-Wformat=]
(unsigned long long) i, ctr, val);
^
test_timestamps.c:99:21: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long long unsigned int’ [-Wformat=]
test_timestamps.c:99:21: warning: too many arguments for format [-Wformat-extra-args]
test_tx_onoff.c:124:9: warning: unknown conversion type character ‘l’ in format [-Wformat=]
printf("Sending burst @ %llu\n", (unsigned long long) meta.timestamp);
^
test_tx_onoff.c:124:9: warning: too many arguments for format [-Wformat-extra-args]
Moved function to get string description to conversions.c.
There's a similar function within libbladeRF's backend.c, but that
is intended to be used in the device information string; this is
intended to be a bit more humand-readable.
API functionality to probe for FX3 bootloader devices and download
firmware to detected devices has been introduced.
This is based upon the boot image format/procedure documented in
Cypress's AN76405: "EZ-USB (R) FX3 (TM) Boot Options"
http://www.cypress.com/?docID=49862
This changeset introduces functionality for reading and validating an FX3
firmware file, as well as for accessing the firmware data in a
per-section manner.
The validation currently consists of testing the checksum, checking
size fields for bogus values, detecting a truncated file, and
ensuring that RAM addresses are in the SYSMEM or I-TCM regions of
the FX3's address space, assuming the default linker script is used
(which the bladeRF firmware does use).
This is based upon the boot image format documented in Cypress's AN76405:
"EZ-USB (R) FX3 (TM) Boot Options" (http://www.cypress.com/?docID=49862)
'status' would not be initialized if t->num_iterations < 0. This shouldn't
happen anyway, but it has been fixed to keep the static analysis reports
free of false positives.
Most of the libbladeRF_test items contain their own command line
argument handling, yielding repeated code and inconsistent invocations.
This commit introduces common command-line argument handling and device
configuration for the most used device parameters.
Future patches will migrate the tests over to using this functionality.
New tests should use this immediately.
Because the libbladeRF tests were nested under the libbladeRF build,
they were being built with the include paths, library paths,
etc. used when building libbladeRF.
This was masking build issues that libbladeRF users might experience,
such as MS Visual Studio 12 and earlier failing due to a lack of a
stdbool.h header. (We now include our stdbool.h, and have an option to
disable our C99 compat includes.)
Therefore, these tests have been moved in the build hierarchy to avoid
cross-pollination of the libbladeRF build environment and the tests'
build environment. This should better represent users building against
libbladeRF, and hopefully bring issues to light earlier.