All executables and libraries are now placed in a single "output" directory.
For Windows builds, third-party DLLs are copied into this directory.
This commit also moves some CFLAGS changes in the top-level CMakeLists.txt
down to where some other compiler flags are set up. (Non-functional change)
- Added method to libbladeRF
- Added new VID/PID pair to udev rule to prevent requiring root access
- Added jump_to_boot bladeRF-cli command
- Fixed most warnings in FX3 firmware
Added a new conversion function that accepts a list of suffix to
multiplier mappings, and applies the appropriate multiplier to the input
value. Utilized this new conversion function in the CLI for set
bandwidth, set samplerate, and set frequency.
If a flash calibration or OTP section are either corrupted or not set
the serial, trim, and FPGA size will not be read back. Under these
conditions, some "dummy" values are populated in the device structure,
to avoid uninitialized variables being thrown around.
This will allow folks without libtecla installed to use a simple (albeit
less feature-rich) interactive mode and script support. Interactive mode
is now always compiled in, and the build option, ENABLE_INTERACTIVE_TECLA
has been replaced by ENABLE_LIBTECLA.
The simple fgets-based implementation currently does not support path expansion.
The -v or --verbosity flag can be used to set the libbladeRF verbosity.
In the future, we should also start using this to potentially supress
CLI output.
Also fixed in this commit:
- bladerf_open() typo in help text
- Removed "b" option from OPTSTR, as this is no longer supported
Added a mechanism to log messages with different priority levels, and to
filter which messages are output by setting a threshold level. The
function to set the current log level/verbosity is exposed through
libbladeRF.h, while the logging function/macros themselves are private
to this project, and are present in log.c/log.h. Callers should use the
convenience macros bladerf_log_[level]() to issue their log messages.
These macros piece together a format string that contains the message
priority and, for warning and higher priorities, the function and line
number on which the message was logged. Also, warning level and higher
level messages are output to stderr, rather than stdout.
Also updated the calibration routine in the CLI. The CLI might need rethinking since, for the calibration to be successful, the module must be enabled. Currently unless we're actively transmitting or receiving, the module is disabled.
Need to add a way to figure out if the module is enabled before trying to calibrate it.
Some users have shown large DC offsets. I've seen these offsets
initially but they become much more reasonable after the first
few sample buffers come out of the FPGA.
Currently DC offset appears to be +/-30 or so after running
the calibration.
In the cli, run 'cal' to run through all modules of calibration.
These changes are based upon those provided by engidea for Issue #64,
with some additional little naming changes.
To avoid having to deal with compiler-specific endianness macros,
the fixup routines contain the converion macros even for the
little-endian host case, assuming these will be optimized out, given
that they are generally empty macros.
The following scenario was resulting in the assertion at line 235.
tx_csv_to_c16's interface specifies that it modiefies the file
descriptor -- in the failure case this means that it should close it
down.
```
bladeRF> tx config file=/dev/urandom format=csv
tx: Invalid I value encountered in CSV file
bladeRF> tx config format=bin
bladeRF> tx start
```
The underlying problem for Issue #43 was a return of -1 for any
failures, rather than an apppropriate CMD_RET_* code. Since -1 ==
CMD_RET_QUIT, this error would cause the application to quit (hence the
issue being labeled a "crash")
The reworked parsing has been rolled back since the parsing was not the
source of the issue. Changes from ee364bba3e will be cherry-picked
back in as needed.
The ADC can be configured to sample from the internal inputs
or from the external pins. Adding the API to change the sampling
between internal and external. Also using the appropriate API
function for the CLI.
This addresses some invalid accesses reported by valgrind. However, a few issues remain:
- Accessing calibration data on a 2.0 port causes an invalid access
- The libusb backend's implemation of open() will need to be
refactored in order to support matching on serial numbers.