The functions which return ranges, available modes, gain stages, etc, do
not directly access the hardware and should therefore not need locks
around them.
* host: libbladeRF/bladerf2: FIR filter updates
New FIR filters based upon research and experimentation. The default RX
FIR filter was built using Analog Devices' filter design tools, which
account for the filters upstream of the RX FIR block.
Additionally, two 128-tap, decimate/interpolate-by-2 filters are
present, for RX and TX, providing an even flatter spectrum under certain
circumstances.
* host: libbladeRF/bladerf2: default bypass TX FIR
The default TX FIR filter configuration literally does nothing, so this
disables it entirely by default.
* host: libbladeRF: fix async.h include in cyapi.c
* host: libbladeRF: add devinfo.h include to cyapi.c
* host: libbladeRF: cyapi.c: swear profusely at MSVC
When ending a loopback test (e.g. with
libbladeRF_test_digital_loopback), a spurious 0x40 error occurred from
trying to clear the glChHandlePtoU DMA channel, which does not get set
up if loopback is enabled.
Latch the data heading to the DAC, so that it is valid when the AD9361
interface expects it.
This addresses a bug in single-channel TX mode where samples would get
rearranged under some circumstances.
Moves the actual functions that do things into printset_hardware.c, printset_impl.c, and printset_xb.c, keeping printset.c for utility funcs.
Fixes a segfault when doing 'set agc' with no args.
Prints a warning if 'set gain' will not immediately take effect, as gain changes are not reflected immediately if RX is not active, and RX gain cannot be changed at all if AGC is active.
Renames print/set adf_enable -> print/set clock_ref
Renames print/set adf_refclk -> print/set refin_freq
Documentation update, consistency/display/formatting improvements.
* host: libbladeRF: add bladerf_ad9361_get_ctrl_out
Adds functionality to read the CTRL_OUT pins from the AD9361 RFIC.
* host: bladeRF-cli: add print for AD9361 CTRL_OUT
* host: python: add support for ad9361_ctrl_out
* host: libbladeRF: deprecate bladeRF1 gain controls
We now have bladerf_{get,set}_gain and bladerf_{get,set}_gain_stage,
which are both general-purpose functions replacing the bladeRF1-specific
VGA/LNA library calls.
* host: libbladeRF: deprecate bladeRF1 trimdac controls
Instead of bladerf_dac_write and bladerf_dac_read, folks should use
bladerf_trim_dac_write and bladerf_trim_dac_read.
If the USB interface is not connected, CyU3PUsbGetSpeed() returns
CY_U3P_NOT_CONNECTED. Previously we treated this as an error, which
caused failures when loading an FPGA bitstream from flash in a headless
configuration.
We now assume a reasonable DMA size and skip the USB configuration
altogether if there is no USB connection.
- new build distinguishers:
- compiler: gcc or clang
- buildtype: Release or Debug
- taggedrelease: NO or YES
- add com.nuand.ci.* labels for image metadata
- create a base image with a pruned checkout, to reduce disk consumption
and to snapshot the working directory's state at the start of a build
spree
- add -j$(nproc) to the make invocation
- reorganize Dockerfiles to improve build cache hits
- build.bash: iterate over rel, compiler, and buildtype, for a
combination of 6 builds per distro version
- build.bash: general restructuring for DRY
With this commit, we build without warnings on Arch Linux; CentOS 7; Debian 8 and 9; latest Fedora; Ubuntu 14.04, 16.04, 17.10, and 18.04; Visual Studio 2017; and macOS 10.13.3 w/ Homebrew.
* host: libbladeRF: compile AD9361 srcs with -std=gnu11
Fixes compile errors involving ‘for’ loop initial declarations only
allowed in C99 or C11 mode, on older GCCs.
* host: libbladeRF/adi: remove stdbool workaround
This is not necessary now that we're building to -std=gnu11, and in
fact, it seems to create a conflict.
* host: libbladeRF: pre-declare loop variables
Some compilers are not happy with declaring the loop variable in the for
statement. Begrudgingly placate them.
* host: libbladeRF_test: pre-declare loop variables
Some compilers are not happy with declaring the loop variable in the for
statement. Begrudgingly placate them.
* host: bladeRF-cli: pre-declare loop variables
Some compilers are not happy with declaring the loop variable in the for
statement. Begrudgingly placate them.
* host: libbladeRF: remove refs to strings.h
Windows doesn't have strings.h, but string.h seems to do just fine.
* host: libbladeRF: fix windows compile errors (WIP)
* host: libbladeRF/ad9361: fix windows compile error
"IGNORE" is #define'd in the Windows environment, creating a conflict.
Renaming this to solve the conflict.
* host: common: add setenv implementation for Windows
* host: libbladeRF: build setenv.c stub on Windows
* host: bladeRF-cli: use setenv stub on Windows
* host: common: fixup spacing consistency in setenv
* host: libbladeRF: cast channel macros to bladerf_channel
Visual Studio is picky about this, and throws warnings.
* host: libbladeRF: bladerf2.c: undo workaround for bladerf_channel
* host: libbladeRF: bladerf_get_gain_stages count type is now size_t
This fixes a Windows compile error, and is also generally more sensible.
* host: bladeRF-cli: fix windows compile errors
* host: ad9361: fix variadic macro syntax
Fixes Windows build errors
* host: ad9361: rename _DEBUG to AD9361_DEBUG
Visual Studio automagically sets _DEBUG if the /MDd option is set. Turns
out that a lot of the debugging sections don't build in Visual Studio,
so this accounts for a large number of the build errors...
* host: libbladeRF: fixes for Visual Studio builds
* host: common: fixes for Visual Studio builds
* host: libbladeRF/ad9361: fixes for Visual Studio builds
* host: libbladeRF_test: fixes for Visual Studio builds
* host: bladeRF-cli: fixes for Visual Studio builds
* host: bladeRF-cli: fix static analysis warnings
Fixes potential memory leak in main
Fixes unused values in set_adf_refclk, set_samplerate
* host: common: fix static analysis warnings
fixes:
unread variable in perform_rx_cal
memory leaks in add_arg, add_opt
* host: libbladeRF: fix static analysis warnings
fixes unused variables in bladerf2_set_gain and xb100_enable
* host: libbladeRF: clang-format of bladerf.c
* host: libbladeRF: update apply_config_options
Update apply_config_options to use new semantics for channel specifiers
and range min/max determination
Also fix a couple typos
* host: libbladeRF/doc: fixup old channel references
* hdl: bladeRF-micro: adjust pin layout for rev1.1 hw
Update the pinouts for adi_{rx,tx}_spdt{1,2}_v{1,2} to reflect move from
bank 5A to banks 5B/4A
Move INA219 I2C pins to bank 5A
Move ADP2384 sync pins to bank 7A
Move ADF4002 control pins to bank 5A
* hdl: bladeRF-micro: move {rx,tx}_bias_en from bank 7A to 5A
rx_bias_en moves from J11 to R22
tx_bias_en moves from A13 to R21
* hdl: bladeRF-micro: move mini_exp{1,2}, rm c5_clock1
In Bank 7A,
c5_clock1 is deleted from H16
mini_exp1 moves from J18 to H16
mini_exp2 moves from J17 to H15
* hdl: bladeRF-micro: remove refs to c5_clock1
* hdl: bladeRF-micro: set max toggle rate for SPDT switches
Fixes Critical Warning (12888) for high estimated crosstalk
on adi_rx_data[1] by adi_{rx,tx}_spdt{1,2}_v[{1,2}]
* host: misc: add Dockerfiles for multi-distro test builds
It is now possible to perform test builds automatically across various
releases of Arch, CentOS, Debian, Fedora, and Ubuntu with:
bash host/mis/docker/build.bash
* host: docker: fix ld.so.conf for centos-7
* libbladeRF/matlab: change win64 bool type (#543)
This should fix an error in recent Thunk builds. I am not sure what the
side effects of this will be (esp. with older Matlab versions) but this
seems to work now.
* host: libbladeRF_bindings: re-sort libbladeRF_proto.m to match recent MATLAB output
* host: matlab: update for libbladeRF 1.9.0
Add a few missing functions:
bladerf_set_gain_mode
bladerf_get_gain_mode
bladerf_set_smb_mode
bladerf_get_smb_mode
bladerf_trigger_init
bladerf_trigger_arm
bladerf_trigger_fire
bladerf_trigger_state
bladerf_set_vctcxo_tamer_mode
bladerf_get_vctcxo_tamer_mode
bladerf_xb300_set_trx
bladerf_xb300_get_trx
bladerf_xb300_set_amplifier_enable
bladerf_xb300_get_amplifier_enable
bladerf_xb300_get_output_power
bladerf_get_fw_log
bladerf_init_stream
bladerf_stream
bladerf_submit_stream_buffer
bladerf_submit_stream_buffer_nb
bladerf_deinit_stream
bladerf_read_trigger
bladerf_write_trigger
Add a few missing structs and enums, related to above
Also remove the bool_ret/bool_arg vars, as they aren't really needed any
more.
* host: matlab: fixup uint64s, cleanup
Removed the 'pathsep' from the architecture case, since it's seemingly
set by matlab itself
Not pre-allocating ival, to avoid having to count that high
* host: matlab: comment out stream-related protos
Matlab doesn't support FcnPtrs (bladerf_stream_cb) or voidPtrPtrPtr
(void***), so bladerf_init_stream is not usable. If bladerf_init_stream
isn't usable, then anything involving struct bladerf_stream isn't
usable.
Calling ReleaseMutex without CloseHandle will let the mutex still exist until the process exists.
In such scenario, further calls to CreateMutex will succeed but GetLastError will return 183 (ERROR_ALREADY_EXISTS) causing libbladerf to fail opening the device. This can be assessed by running ```libbladeRF_test_open.exe -c 2 -v debug```.
Cypress backend is not affected as it systematically closes the handle after releasing the mutex.
* host: common: add mkdtemp implementation for Win32
Windows does not have mkdtemp, which is something used by at least one
test case. This is a simple-enough implementation thereof.
* host: common/host_config: add more defs on Win32
chdir, getcwd, rmdir, unlink, and mkdir are all somewhat special on
Win32, so they need special handling.
* host: test_config_file: fix builds on Win32
* host: libbladeRF: fix typo of "bandwidth" cfg file key
* host: libbladeRF: add documentation for config files
* host: libbladeRF: config.c: minor typo fix
* host: libbladeRF_test: add test case for config file parsing
Creates a surrogate config file with a few different scope restrictions,
then makes sure the configuration is applied appropriately in the end.
This leads to AGC being disabled on every call of bladeRF-cli.
Please see https://github.com/Nuand/bladeRF/blob/master/host/utilities/bladeRF-cli/src/cmd/xb300.c#L117 for the proper usage.
I'm not sure if only checking LSB is the proper way to do it, as val (uint32_t) is uninitialized and str2bool sees it as bool (on my machine "off" is 2048 and "on" is 2049), but it would even work if those "else if's" are being
reordered, thus initialized by something else to a non-zero value, or you could zero it right before the str2bool call.
The printf call might not be needed anymore.
Notes:
With the latest changes in kalibrate-bladeRF (add win32 support), changing the buffer sizes of m_x_cb, m_y_cb, m_e_cb, the results of the program look even more odd. Were those changes intended? Either the outputs are correct
before and after the patch, or one BTS has the worst clock in history. I think it's the second one.
With the latest FPGA change (0.7.0 -> 0.7.1, using edge_detector instead of pulse_gen), even setting the sample rate can sometimes lead to a failure. (At least on my board, only shortly after power-on)
Have a nice weekend!
Signed-off-by: Christian Inci <chris.gh@broke-the-inter.net>
This version is part of development series of changes, not an official
release.
* FPGA bitstream v0.7.2
* FX3 firmware v2.1.0
* libbladeRF v1.9.1
* bladeRF-cli v1.5.2
* MATLAB & Simulink bindings v0.1.3
* Python bindings v0.9.1
This version is part of development series of changes, not an official
release.
This version depends upon libbladeRF v1.9.1 or later.
* Support for bladeRF Micro
* No longer initializes the bladeRF before loading a new FPGA image,
to avoid potential catch-22 problems
This version is part of development series of changes, not an official
release.
This version of libbladeRF is intended for use with:
FX3 Firmware v2.1.0 (or v1.9.1)
FPGA v0.7.2
Changes:
* Refactor to support for multiple product lines
* Add support for the bladeRF Micro product
* API: replace bladerf_module with bladerf_channel, a
reverse-compatible change to handle products with multiple
independent RF paths in the same direction
* API: BREAKING CHANGE - on bladerf_set_frequency, et al, the frequency
parameter is now uint64_t instead of unsigned int
* Significant code cleanup
* Various other changes that will be listed in more detail during an
official release