Prevent users from loading/flashing the incorrect FPGA image by checking
against the device's reported FPGA size. This was previously only
done (roughly) when writing the FPGA to flash.
Nuand's official bitstreams to not use compression; the FPGA sizes
are known to be specific sizes.
Those making customizations (e.g., enabling compression) may
use the BLADERF_SKIP_FPGA_SIZE_CHECK environment variable.
The combination of CMake and a custom Makefile/toolchain.mk was messy.
This change is to achieve better consistency with the CMake-oriented
workflow of the remainder of the project software and to make it easier
to maintain and change in the future. (CMake options may be used to
enable/disable features.)
Simply enabling SignalTap and specifying the .stp file in the project
settings is not sufficient for getting SignalTap into the build. The
.stp file must be translated into project assignments that get appended
to the .qsf file. This is done by calling 'quartus_stp' with the project
name, revision, the .stp file, and the parameter to enable SignalTap in
the project. Quartus_stp must run successfully before Analysis &
Synthesis.
Also added an exception to let non-Web Editions (e.g. Standard and Pro)
of the Quartus tools to add SignalTap files without enabling TalkBack.
It is possible that the buffer completion callback occurs before
advance_tx_buffer() acts upon a successful return code from
async_submit_stream_buffer().
We must ensure the buffer is in the IN_FLIGHT state before
we temporarily drop the buffer lock (so a stream lock can be acquired),
or else the assertion at sync_worker.c:150 may not be upheld.
Therefore, we default the buffer state to being IN_FLIGHT before
dropping the lock, and revert it to FULL if the buffer submission
fails (due to an error or a need to block in a non-blocking call).
This fixes#458. The associated defect was introduced in:
6b197881 libbladeRF: Utilize all available TX buffers
Clearing these flags when an error occurs does not make sense.
If a user retries the call with a BURST_END flag set (e.g., due to a
short timeout expiring) then this would report an error because the
internal state is no longer in a burst.
Fixes#457.
If wget fails, it's clobbering the FPGA/firmware storage
in /usr/share/Nuand/bladeRF, leading to terrible results.
Download to a temp file, then copy that if wget was
successful.
An MITM where a trusted proxy is frobulating HTTPS is
still possible; checking the md5sum again is probably
a great idea.
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.
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.
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).
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.