Commit graph

1,222 commits

Author SHA1 Message Date
Ryan Tucker
c63143391b generate.bash: gracefully handle pandoc failures 2016-02-14 14:11:56 -05:00
Jon Szymaniak
7c55150c98 host/common: Apply nominal DC offset values at end of cal routines
The nominal DC offset values were being left up to the caller to
apply. However, the bladeRF-cli was not doing this.

For convenience, these functions now apply the resulting nominal
values identified before exiting.
2016-02-10 15:18:44 -05:00
Jon Szymaniak
87751a16cc host/examples: Added GRC loopback example 2016-01-17 21:39:01 -05:00
Jon Szymaniak
2f8208ab71 host/examples: Fixed default gain in rx_gui
This was not using the value supplied via the command-line
2016-01-17 21:05:21 -05:00
Jon Szymaniak
d52fdbf3e0 examples/gnuradio: Added README for rx_gui 2016-01-17 20:24:17 -05:00
Jon Szymaniak
125f5b3ecd host/examples: Point to HTML FRS document
This is preferred over the PDF, as people can link to individual
sections more easily.
2016-01-16 15:51:32 -05:00
Jon Szymaniak
e472cde71d bladeRF-cli: Added newline in firmware loading text 2016-01-16 15:23:58 -05:00
Jon Szymaniak
1be8b76b35 libbladeRF/doc: Fixed link to forums 2016-01-12 13:50:46 -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
a4a065f3ae host: Added endian-conversion macros for use with constants
The existing macros make use of functions, which cannot be used to
define constants on architectures where they are actually implemented
as functions (as opposed to macros).
2016-01-11 23:38:02 -05:00
Jon Szymaniak
279db7aee4 host/common: Added missing extern "C" { ... } in headers 2016-01-11 23:01:20 -05:00
Jon Szymaniak
a459c21209 Merge pull request #449 from pothosware/fix_snprintf_vsnprintf_vc14
libbladeRF: use c99 snprintf/vsnprintf for vc14
2016-01-10 20:49:01 -05:00
Bjoern Kerler
5a360d7b4c libbladeRF: use c99 snprintf/vsnprintf for vc14
These functions come with MSVC 2015 (vc14) as part of the c99 support.
The compatibility definitions in host_config.h.in were causing
a compilation error. This fix disables the compatibility definitions
when the more recent vc14 compiler is detected.
2016-01-10 17:27:36 -08:00
Jon Szymaniak
6e35ea384e matlab: Fixed loopback name typo in bladeRF_Simulink.m 2016-01-08 17:56:16 -05:00
Jon Szymaniak
b4b11da4b9 matlab: README.md touch-ups 2016-01-08 10:57:03 -05:00
Jon Szymaniak
0caef9463b matlab: Updated to v0.1.1 2016-01-07 17:04:10 -05:00
Jon Szymaniak
b2268b5b4d bladeRF-cli: Updated to v1.3.1 2016-01-07 16:49:57 -05:00
Jon Szymaniak
872759540d libbladeRF: Updated to v1.5.1 2016-01-07 16:49:57 -05:00
Jon Szymaniak
f1ce50498c host/examples: Updated link to FRS example documentation 2016-01-07 16:49:57 -05:00
Jon Szymaniak
7f6a461348 matlab: Search for thunk file in '.' and MATLABPATH
Our proto file must provide the absolute path to the thunk library,
whether it is in the current directory or in MATLABPATH (as is the
case with our Windows installer).
2016-01-04 22:36:04 -05:00
Jon Szymaniak
5c3510c0cf host: Addressed warnings from GCC -Os in dc_calibration.c
host/common/src/dc_calibration.c:584:19: error: ‘q_est’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     const int16_t max_est = (i_est > q_est) ? i_est : q_est;
                   ^
host/common/src/dc_calibration.c:679:20: note: ‘q_est’ was declared here
     int16_t i_est, q_est;
                    ^
host/common/src/dc_calibration.c:584:19: error: ‘i_est’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     const int16_t max_est = (i_est > q_est) ? i_est : q_est;
                   ^
host/common/src/dc_calibration.c:679:13: note: ‘i_est’ was declared here
     int16_t i_est, q_est;
             ^

Ensure i_est and q_est are assigned fallback values in error cases.
2016-01-04 09:58:28 -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
8bbf917446 libbladeRF: Addressed warning from GCC -Os in device_identifier.c
Only seeing this warning with GCC - haven't observed this with
Clang or Coverity scans.

host/libraries/libbladeRF/src/device_identifier.c:121:22: error: ‘val’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
             value[i] = tolower((unsigned char) c);
                      ^
host/libraries/libbladeRF/src/device_identifier.c:175:34: note: ‘val’ was declared here
     char *dev_id, *token, *arg, *val, *saveptr;
                                  ^
Addressing this by initializing ptrs to NULL and status variables to
BLADERF_ERR_UNEXPECTED. Added NULL pointer checks.
2016-01-04 09:28:37 -05:00
Jon Szymaniak
f74c8ee071 host: Updated CMake files for different CyUSB3 INF paths 2016-01-03 21:26:50 -05:00
Jon Szymaniak
b5057ed8d9 host/drivers: Updated CyUSB3 INF files for FX3 SDK 1.3.3
SDK 1.3.3 drivers use WDF 1.11 for Win 7 onward and 1.09 for Vista & XP.
2016-01-02 18:20:43 -05:00
Ryan Tucker
e0f9254a40 Specify unsigned integer on big constant (Fixes #444) 2016-01-01 22:44:10 -05:00
Jon Szymaniak
e8cdde2f69 matlab: v0.1.0 release 2015-12-30 23:04:09 -05:00
Jon Szymaniak
420d2f32bc bladeRF-cli: Updated to v1.3.0 2015-12-30 23:04:09 -05:00
Jon Szymaniak
681137c137 libbladeRF: Updated to v1.5.0 2015-12-30 23:04:09 -05:00
Jon Szymaniak
5f90fcc41a libbladeRF: Updated some metadata files 2015-12-30 22:45:58 -05:00
Jon Szymaniak
088f12ba93 libbladeRF: Added LIBBLADERF_API_VERSION
This macro provides API users with a compile-time means to check
the API version. It is intended to help with compile-time feature
detection.
2015-12-30 22:31:16 -05:00
Jon Szymaniak
0132bcbabd host/common: MSVC 2013 build fix
Checks for INFINITY or -INFINITY inherently generate warning C4056,
"by design." Supress this.
2015-12-29 21:10:57 -05:00
Jon Szymaniak
3e5faa42fb libbladeRF: Changed default frequencies
Per the libbladeRF API documentation, it is recommended to keep the RX
and TX frequencies >= 1 MHz apart. For consistency, the default
frequencies have been changed to follow this recommendation.

Additionally, the default frequencies have been moved within the 2.4 GHz
ISM band.
2015-12-29 18:46:38 -05:00
Jon Szymaniak
9514471f57 host/common: Fix warnings on OSX
Use memset() to zeroize bladerf_metadata structure to avoid
missing initializer warnings.
2015-12-29 13:35:19 -05:00
Jon Szymaniak
6a9d7fcb6c host/common: Added check for divide-by-zero
Addresses CID 1346524.

This should never happen because the count input is assigned
from a compile-time constant.

However, this check and assert() are worth having to verify
this assumption, should someone break the code later...
2015-12-29 12:36:02 -05:00
Jon Szymaniak
c87747308e host/common: Fixed handling of BLADERF_ERR_TIME_PAST in DC cal
In the case where the timestamp was in the past we want to
try to resynchronize with the hardware's timestamp counter
rather than blindly increment the timestamp.

This addresses CID 1346525 due to the removal of a return
if status != 0 (rather than handling BLADERF_ERR_TIME_PAST).
2015-12-29 12:24:14 -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
25530a3f4e libbladeRF: Added additional details to function descriptions 2015-12-28 23:15:44 -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
221083a2d6 host/common: Added MIT-licensed DC calibration routines
This code is a re-designed set of DC calibration functionality
built atop of libbladeRF.

This functionality provides the ability to:
    - Run LMS6002D DC calibrations per module (or all at once)

    - Search for nominal RX/TX DC correction values for a single
      frequencies or a range of frequencies.

To avoid inducing issue #408 by utilizing a single stream,
rather than repeatedly starting and stopping streams.

No TX thread is used, as this is uneccessary; it is sufficient to
flush 0+0j samples through the TX path at the start of calibration
and allow the DAC to remain held in this state as the FPGA
(intentionally) underruns.
2015-12-28 22:29:04 -05:00
Jon Szymaniak
454b4931ec host/common: Added str to bladerf_module & bladerf_dc_cal_module fns 2015-12-28 22:20:20 -05:00
Jon Szymaniak
ccce423cff libbladeRF: Added BLADERF_MODULE_INVALID enumeration value 2015-12-28 22:20:20 -05:00
Jon Szymaniak
ad147e2b28 libbladeRF: Added BLADERF_DC_CAL_INVALID enumeration value 2015-12-28 22:20:20 -05:00
Jon Szymaniak
7e704a8edf matlab: Added automatic RX/TX DC correction 2015-12-28 22:20:20 -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
2161248943 libbladeRF: Added API call to read firmware log data
bladerf_get_fw_log() allows API users to retrieve firmware log
data and write it to a file.
2015-12-28 16:10:39 -05:00