Commit graph

202 commits

Author SHA1 Message Date
Keith Rothman
349f93decc [bladeRF-flash] Changed messages to be less hostile when flashing a v1.2 board 2013-09-22 09:22:14 +00:00
Keith Rothman
917f47d8bd [bladeRF-flash] Ignore failures in flashing or reseting, and just look for the bootloader 2013-09-22 08:24:44 +00:00
Keith Rothman
1d481cefd3 [FX3/libbladeRF] Added explicit calibration cache 2013-09-22 08:07:08 +00:00
Keith Rothman
004ea967b5 [libbladeRF] Removed incorrect free 2013-09-22 08:07:08 +00:00
Keith Rothman
57116c919a [FX3/libbladeRF] Major refactoring of FX3 application
- Split RF, FPGA load, and firmware methods into seperate .c files
 - Split several vendor requests to eliminate magic glEp0Idx and to allow
   for better error handling
   - Updated libbladeRF to use new vendor requests and properly check return
     code.
 - Changed glSpiPageSize from global to #define
 - Move OTP handling into firmware.c
 - Version bump

Conflicts:

	fx3_firmware/bladeRF.c
2013-09-22 08:06:48 +00:00
Jon Szymaniak
cc1e290422 libbladeRF: Fixed # samples parameter on initial TX callbacks (libusb backend) 2013-09-21 14:21:02 -04:00
Keith Rothman
06c204ff13 Assorted fixes for problems found via USB30CV and USB20CV
- Move and use interface numbers
 - Renumber USB_IF_CONFIG from 0 to 3
 - Introduced 0 alt-interface as a NULL interface
 - Fixed FS descriptor length
 - Implemented GET_STATUS, SET_FEATURE, CLEAR_FEATURE w.r.t. halting bulk streams
 - Added include guards for firmware_common/bladeRF.h
 - Changed guard on suspend/resume requests to key on glUsbConfiguration instead
   of glUsbAltInterface.  This is because suspend/resume requests are on
   interfaces, not endpoints.
 - Addresses github tickets #97, #98, #99
2013-09-21 14:08:29 +00:00
Jon Szymaniak
7a5961688e libbladeRF: Fixed use of uninitialized data (libusb backend)
Fixed defect introduced in 9015bdbb5c, where a device handle's device identifier information was being populated from a (most likely) uninitialized bladerf_devinfo, rather than the one fully populated by a call to lusb_get_devinfo().
2013-09-19 11:11:41 -04:00
Jon Szymaniak
553985478b cmake: Added check for libusb_get_version (github edit)
This function is used by libbladeRF. This check effectively ensures the library is >= 1.0.10.
2013-09-19 10:03:35 -04:00
Jon Szymaniak
9015bdbb5c libbladeRF, bladeRF-flash: Added device identifier info matching to API routines
Initializing, extracting, and comparing device identifier information
(struct bladerf_devinfo) is now exposed through the API. Among other
things, this allow users to check if a device specifier string matches a
device they already have a handle for.

To support this, a copy of bladerf_devinfo information is now kept around in
the device handle; backends are responsible for populating this in their
open() implementation. A couple of the fields were already present, so
this only adds a couple small variables worth of overhead.

Some re-arranging of the linux and libusb probe and open calls has been done
to achieve this. A few warnings and bugs were addressed in this process:

  - The Linux backend was attempting to fill in a serial number via
    a cached entry.

  - There was some potential for a read of an uninitialized portion
    of an otp buffer.

  - Missing serial # has been made non-fatal. (Some developers'
    device do not have serial numbers.)

Files associated with this functionality was moved from host/common
back into the library, which should now be used instead. bladeRF-flash
has been updated to use these new API functions.
2013-09-18 23:15:48 -04:00
Brian Padalino
372fd51586 libbladeRF: Host side fix for #107.
Setting the SPI flash interface is not required for reading.  Only for writing.  Turns out, if you try to set that interface twice then things do not go so well.

I am not 100% sure if this is just a host side fix for a firmware issue, but it alleviates the problem for now.

Also fixed some tabs that snuck in there.
2013-09-18 18:37:05 -04:00
Jon Szymaniak
a79bf948c4 libbladeRF: Workaround for libusb_set_interface_alt_setting() issue in Windows
This addresses Issue #101, in which prevents FW 1.0 users from upgrading.
2013-09-16 23:03:41 -04:00
Jon Szymaniak
a5f68dfeb8 host: All build output is placed in a single directory
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)
2013-09-16 01:23:04 -04:00
Robert Ghilduta
512b542ac3 libbladeRF: call flash_firmware() with the correct buffer size
The buffer size is aligned to flash sector boundaries, this new size needs
to be propagated to flash_firmware().
2013-09-15 00:45:18 -04:00
Nuand
264fb4428e Merge pull request #103 from litghost/windows_build_fix
[test_repeater] Fixed windows build
2013-09-15 00:00:37 -07:00
Nuand
9e7d543b9b Merge pull request #104 from litghost/fix_hotplug_check
Fixed detection of hotplug
2013-09-14 23:42:59 -07:00
Keith Rothman
70e93d21f6 Fixed detection of hotplug 2013-09-15 06:38:16 +00:00
Robert Ghilduta
00ba848e6b Cmake: fix error that caused all build versions to be labelled -dirty 2013-09-14 23:31:49 -07:00
litghost
c5c3cb11a2 [test_repeater] Fixed windows build 2013-09-14 23:22:11 -07:00
Robert Ghilduta
e9bc007b39 host_config.h.in: fix Sleep() argument
Windows' Sleep() function expects the argument to be specified in milliseconds
2013-09-14 23:19:13 -07:00
Robert Ghilduta
aa9c2f5777 libbladeRF: fix uninitialized warning that is now treated as an error 2013-09-14 23:00:54 -07:00
Nuand
fcc51d40ac Merge pull request #102 from litghost/warning_fixes
Warning fixes
2013-09-14 22:55:24 -07:00
Keith Rothman
a2ca6460c0 [Host-tools] Enabled -Werror to try and prevent commits with warnings 2013-09-15 05:52:36 +00:00
Keith Rothman
d4fda17d67 [libbladeRF] Added some missing error checking in Si5338 2013-09-15 05:51:15 +00:00
Robert Ghilduta
4f55c9e33d host: temporarily disable building bladeRF-flash if libusb-1.0.17 isn't installed 2013-09-14 22:41:54 -07:00
Keith Rothman
530015e262 Fixed timing out libusb when flashing 2013-09-15 05:32:04 +00:00
litghost
7ac5276574 Cleaned up assorted prints and fixed not clearing found var on get events 2013-09-15 05:32:04 +00:00
litghost
d704a99cea Assorted fixes for bugs when testing on Windows 2013-09-15 05:32:04 +00:00
Keith Rothman
75f4c18771 Handful of stragler log fixes 2013-09-15 05:32:04 +00:00
Keith Rothman
db5f990e32 Fixes found during testing of bladeRF-flash
- Looks like trying to transfer data just before a RESET doesn't complete
   Changed RESET vender request to data-less
 - Fixed some missing new line chars
2013-09-15 05:32:04 +00:00
Keith Rothman
b530c7266d Initial version of bladeRF-flash tool 2013-09-15 05:32:04 +00:00
Keith Rothman
1da070aca4 [bladeRF-flash] Initial version 2013-09-15 05:32:04 +00:00
Keith Rothman
d36f91cb7d Initial JUMP_TO_BOOTLOADER support
- 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
2013-09-15 05:32:04 +00:00
Keith Rothman
1c4fa232eb [libbladeRF/bladeRF-cli] Added support booting directly from the FX3 bootloader 2013-09-15 05:31:57 +00:00
Keith Rothman
07dbf5e622 [bladeRF-cli] Added erase option to cli 2013-09-15 04:59:03 +00:00
Keith Rothman
ee37214898 [libbladeRF] Exposed erase/read/write functions 2013-09-15 04:59:03 +00:00
Jon Szymaniak
354625e809 libbladeRF: Clarified a few items in the header documentation. 2013-09-14 18:02:27 -04:00
Jon Szymaniak
ce2367c562 libbladeRF: Cleaned up a few minor Doxygen warnings 2013-09-14 17:39:43 -04:00
Jon Szymaniak
6819369b61 libbladeRF: bladerf_load_fpga no longer checks current FPGA status
This check was only being used to print an informational message.
However, it was supposed to be used to change the return value to
indicate the FPGA being re-loaded versus loaded.

Because the caller can check the FPGA state via
bladerf_is_fpga_configured(), this check has been pulled out, and the
interface now specifies that this functions return value only indicates
success (0) or failure (error code).
2013-09-14 17:14:47 -04:00
Brian Padalino
46eacaa462 libbladeRF: si5338 refactored to support fractional sample rates. 2013-09-14 16:52:59 -04:00
Jon Szymaniak
3f31d7dac2 libbladeRF: Added simple full-duplex repeater test
This test program re-transmits received data in real time (optionally on
a different frequency.)
2013-09-14 15:11:08 -04:00
Brian Padalino
3d91831170 libbladeRF: Initialize the VCTCXO trim value. 2013-09-11 18:30:00 -04:00
Brian Padalino
4cb8212f8c libbladeRF: Return invalid parameter for bad enum. 2013-09-11 18:21:08 -04:00
Brian Padalino
262d4cd39c Fix typo. 2013-09-11 08:44:10 -04:00
Jon Szymaniak
2dcae9eeb2 libbladeRF & common: Renamed logging routines to address conflicts
The common logging functions have been renamed in order to not
conflict with the library's bladerf_log_set_verbosity().
2013-09-11 00:29:14 -04:00
Jon Szymaniak
01c105eb3b Merge pull request #85 from gpaliot/arch-pkgbuild
PKGBUILD scripts for Arch Linux AUR
2013-09-10 17:04:26 -07:00
Jon Szymaniak
7d5129e581 Merge pull request #86 from gpaliot/fix-cmake-c-flags
Quoted CMAKE_C_FLAGS to fix build issue
2013-09-10 16:11:21 -07:00
Brian Padalino
b0366761d3 libbladeRF: Fixed return codes and checking.
Erroneously reporting bad reading information when in fact it was correct.  Fixes issue #94.
2013-09-09 18:31:21 -04:00
Adam Greig
38273dcd8a libbladeRF: Add bladerf_set/get_lpf_mode
Add functions to bypass and disable the LPF and check whether it is currently
bypassed or disabled.
2013-09-09 03:55:03 +01:00
Brian Padalino
ead582406e libbladeRF: Trim DAC writing was broken. Fixed. 2013-09-08 16:37:18 -04:00