Commit graph

2,059 commits

Author SHA1 Message Date
Robert Ghilduta
dccc4edc2f Filenames are starting to become ambiguous without full pathnames 2017-12-07 17:10:28 -08:00
Robert Ghilduta
3a6742b716 Remove unused CMake macro file 2017-12-07 17:10:28 -08:00
Rey Tucker
6116d09049 libbladeRF: add compilation hint to boilerplate.c
h/t owen on IRC
2017-08-09 10:58:08 -04:00
Rey Tucker
1d41ada308 Merge pull request #525 from Nuand/rtucker-issue-511
host/CMakeLists: dequote variables in ifs (CMP0054) #511
2017-08-07 18:18:17 -04:00
Rey Tucker
b8f3cb8315 Merge pull request #524 from Nuand/rtucker-issue-447
host/README.md: add pthreads-win32 build instructions (#447)
2017-08-07 18:17:32 -04:00
Rey Tucker
155cd5266d Merge pull request #522 from Nuand/rtucker-issue-475-clean
CyAPI: Define Windows 10 support, fail gracefully if missing (#475)
2017-08-07 18:17:00 -04:00
Rey Tucker
63aba8076b Merge pull request #521 from Nuand/rtucker-issue-520
host/libbladeRF/cyapi: ReleaseMutex before CloseHandle
2017-08-07 18:16:30 -04:00
Rey Tucker
33da458132 host/cmake/CyAPI: define Windows 10 support
This requires that the user get special additional drivers in addition
to the ones provided by the usual SDK; a URL will point in the right
direction.

Note that this does not remove the requirement for driver signing.  Some
work will be needed to document how to do this.
2017-08-07 18:09:30 -04:00
Jon Szymaniak
70d5fb14b2 libbladeRF: Treat incompatible OS version as "not found" in FindCyAPI.cmake 2017-08-07 18:08:34 -04:00
Rey Tucker
a075d0149b host/CMakeLists: dequote variables in ifs (CMP0054) #511
Per CMake Policy CMP0054, the meaning of constructs like

if("${FOOBAR}" STREQUAL "quux")

is ambigious, and the old meaning is deprecated.

https://cmake.org/cmake/help/git-stage/policy/CMP0054.html
2017-08-07 12:27:21 -04:00
Rey Tucker
8cec8d03dd host/libbladeRF/cyapi: ReleaseMutex before CloseHandle
When working on mutexes for the libusb backend, I noticed that I needed
to ReleaseMutex() when closing the device, or else that device would not
be usable again until all of the mutexes were released.

I have not tested this with CyAPI as yet, but I believe the same problem
will occur, and I also believe this may fix it.
2017-08-07 11:35:16 -04:00
Rey Tucker
343d4d095f Merge pull request #519 from Nuand/rtucker-issue-484
Enforce exclusive access to bladeRF when using libusb under Windows
2017-08-04 20:16:55 -04:00
Rey Tucker
880f195e90 host/libusb.c: properly release/close handles 2017-08-04 18:00:34 -04:00
Rey Tucker
72322089c6 host/libusb.c: fix create_device_mutex errors (#484)
This builds and correctly enforces exclusive access under Windows 10.
2017-08-04 17:17:29 -04:00
Rey Tucker
daab20341f host/backend/libusb: enforce exclusive access (#484)
Windows seems to allow multiple instances of libbladeRF to open the same
device, which is problematic in many ways.  This borrows the mutex
approach from cyapi.c to enforce exclusivity.
2017-08-04 16:44:30 -04:00
Rey Tucker
6ea688d3ef Merge pull request #518 from Nuand/rtucker-issue-517
host/cmake: search for pthreadVC2.dll more vigorously (#517)
2017-08-04 16:42:48 -04:00
Rey Tucker
bafb0b5ca0 host/cmake: search for pthreadVC2.dll more vigorously (#517)
With the pre-built binary pack, pthreadVC2.dll lives in a
dll/${ARCHITECTURE}/ directory.  However, when compiling from scratch,
it just lives in the source code's root directory.  Look in both places
and set a LIBPTHREADSWIN32_DLL variable accordingly.
2017-08-04 16:07:49 -04:00
Rey Tucker
889c9cd6c8 Merge pull request #516 from Nuand/rtucker-issue-515
host: dc_calibration.c: fix int conversion in rx_cal_dc_off (#515)
2017-08-04 15:26:53 -04:00
Rey Tucker
f680b9ba8c host: dc_calibration.c: fix int conversion in rx_cal_dc_off (#515)
MSVC warns of loss of precision on implicit conversion from float to
int16_t.  Instead of relying on truncation, do a proper round with
bounds-checking.
2017-08-04 15:21:22 -04:00
Rey Tucker
5ba6482ed1 Merge pull request #514 from Nuand/rtucker-issue-512
host/usb.c: add missing set_agc_dc_correction handler (#512)
2017-08-04 14:10:03 -04:00
Rey Tucker
db18fd308c host/usb.c: add missing set_agc_dc_correction handler
backend_fns_usb_legacy was missing a .set_agc_dc_correction member,
which causes issues with some compilers.  Stubbed in
set_agc_dc_correction_unsupported.
2017-08-04 14:07:16 -04:00
Rey Tucker
70cc0a0020 Merge pull request #513 from Nuand/rtucker-issue-508
macOS: detect clock_gettime presence directly, instead of inferring from version (#508)
2017-08-04 13:50:30 -04:00
Rey Tucker
2665f90649 host/README.md: add pthreads-win32 build instructions (#447)
On recent versions of Windows / Visual Studio, struct timespec is
already defined, and the definition is subtly different than what
pthreads-win32 is built with.

It may be possible to handle this in a more automatic fashion via CMake,
but this is TBD.
2017-08-04 13:40:37 -04:00
Rey Tucker
236753aaea clock_gettime.c: remove HAVE_CLOCK_GETTIME check
This is not necessary due to the fact that cmake only includes this file
if clock_gettime is missing in the first place.
2017-08-03 10:56:17 -04:00
Rey Tucker
5ba5f16221 clock_gettime.h: include host_config.h 2017-08-02 19:25:49 -04:00
Rey Tucker
7c5f969f4d CONTRIBUTORS: self-updating 2017-08-02 18:06:21 -04:00
Rey Tucker
786c3cc001 Merge pull request #507 from Nuand/rtucker-debian-fiximgperms
Fix permissions on downloaded FPGA/firmware images in debian package
2017-08-02 17:52:18 -04:00
Rey Tucker
63c5be3105 host: add note about Fedora and /usr/local (#490) 2017-08-02 17:34:52 -04:00
Rey Tucker
d8c588cacb Merge pull request #510 from Nuand/rtucker-issue-491
nios: fix si5338_write typo (#491)
2017-08-02 16:01:55 -04:00
Rey Tucker
5010221620 hdl: missed one Web Edition reference on the README 2017-08-02 15:55:32 -04:00
Rey Tucker
0a8d5a4cef hdl: update README to Quartus 17.0
Also HTTPSify URLs and freshen references to Intel® Cyclone® FPGA and
Quartus® Prime Design Software
2017-08-02 15:49:16 -04:00
Rey Tucker
bb45060fb2 nios: fix si5338_write typo (#491)
Unnecessary bit is being set when writing address.
2017-08-02 15:35:27 -04:00
Rey Tucker
0779109841 host: explicitly test for clock_gettime (#508)
Instead of using version-based guessing on macOS (which appears to fail
with newer versions of Xcode on older versions of macOS), use an
explicit test for clock_gettime in CMake.
2017-08-02 15:02:38 -04:00
Rey Tucker
037e2886f2 udev: fix CMakeLists syntax error (#509) 2017-08-01 15:29:56 -04:00
Rey Tucker
c66d7fe4d1 debian: update changelog w/r/t this fix 2017-07-25 15:51:18 -04:00
Rey Tucker
7544c671b2 libbladeRF: more descriptive error on file_read_buffer failures
In the event that file_read_buffer fails, print a more useful error
message to make it easier to track down the problem
2017-07-25 15:40:45 -04:00
Rey Tucker
3b7b96055c debian: chmod 0444 downloaded fpga/fw images
The mktemp/wget workflow creates the data files chmod 0600, which breaks
loading of firmware for non-root users.  Explicitly chmod 0444 to allow
all users to read.
2017-07-25 15:07:54 -04:00
Robert Ghilduta
2ce14de630 libbladeRF: fix GCC 7 error
GCC 7 rightfully believes that this buffer can be 11 bytes long. Counting the
additional NULL byte, this buffer should be at least 12 bytes in size.
2017-07-06 08:27:47 -07:00
Robert Ghilduta
77c4c1b750 2017.07 release changelog 2017-07-06 08:27:47 -07:00
Robert Ghilduta
dcc7647fef bladeRF-cli: changelog and version bump ( v1.5.0 ) bladeRF-cli_v1.5.0 2017-07-06 08:27:47 -07:00
Robert Ghilduta
fe718e8f70 bladeRF-cli: add AGC print and set commands
The AGC can be enabled by running set agc on, and it can be disabled by running
set agc off.
2017-07-06 08:27:47 -07:00
Robert Ghilduta
8f7b4f10c4 hdl: bump the FPGA version to 0.7.0 fpga_v0.7.0 2017-07-06 08:27:47 -07:00
Robert Ghilduta
bdf8958f25 hdl: add band selection to AGC
This fixup allows the AGC LMS driver to select the appropriate LNA when changing
the LNA's gain. libbladeRF reads, masks, and writes this field, however for
performance reasons the AGC LMS driver should know the final value of the
register without first reading it.
2017-07-06 08:27:47 -07:00
Robert Ghilduta
e60ca35427 hdl: instantiate DC LUT NIOS exports 2017-07-06 08:27:47 -07:00
Robert Ghilduta
258d875829 hdl: add DC LUT NIOS exports 2017-07-06 08:27:47 -07:00
Robert Ghilduta
24003d87bd hdl: upgrade NIOS to Quartus 17 2017-07-06 08:27:47 -07:00
Robert Ghilduta
ce9476b9f3 hdl: add DC LUT mux correction
Allow the AGC to choose the appropriate DC offset LUT setting for correcting
the DC offset. Essentially, libbladeRF loads the DC offset lookup table from a
previously computed DC calibration table, and NIOS exposes the correction for
each of the gains. The AGC the selects which correction it wants applied based
on its gain setting.
2017-07-06 08:27:47 -07:00
Robert Ghilduta
86dc25d225 hdl: add AGC synchronizers
The AGC core runs in a different clock domain for that of the NiOS core. Three
synchrinozers have been added to allow the AGC core to drive signals in the
lms_rx_clock_out clock domain while communicating with the NiOS core in the
\80MHz\ clock domain.
2017-07-06 08:27:47 -07:00
Robert Ghilduta
0c95136b0b nios: add support for NIOS grabbing the SPI arbiter lock 2017-07-06 08:27:47 -07:00
Robert Ghilduta
908bfcc1e5 hdl: instantiate AGC NIOS support 2017-07-06 08:27:47 -07:00