Commit graph

218 commits

Author SHA1 Message Date
litghost
8ce20e2e58 Enable warning as error for Windows 2013-09-27 16:31:37 +00:00
litghost
abe064cea8 Fixes for Windows build warnings on VS2012 2013-09-27 16:31:37 +00:00
Robert Ghilduta
4e3f01587b libbladeRF: copy lusb_flash_read() and lusb_flash_write() functions for legacy
This commit copies lusb_flash_read() and lusb_flash_write() from the before
57116c91, thus allowing devices running <= v1.3 to upgrade properly.
2013-09-27 00:31:26 -07:00
Brian Padalino
a36ed9a5f1 libbladeRF: More backward compatibility fixes. 2013-09-25 00:31:46 -04:00
Brian Padalino
26e8f3c0c0 libbladeRF: Moved where legacy warning is printed. 2013-09-25 00:31:45 -04:00
Brian Padalino
7ef33c6ba8 libbladeRF: Fixed vendor command to enable RF. 2013-09-25 00:31:45 -04:00
Brian Padalino
d05cc61574 libbladeRF: Support for legacy config interface.
Added checks for the legacy config interface being interface 0 instead
of interface 3 which changed in the v1.4 bump.
2013-09-25 00:31:45 -04:00
litghost
46e261796d Add variable expansion support to recover function 2013-09-24 21:10:38 -07:00
Robert Ghilduta
267cbeab99 libbladeRF: fixup libusb uninitialized errors 2013-09-23 00:35:57 -07:00
Robert Ghilduta
c1e8b10dd2 utilities: fixup: add ver.c to make the previous CMakeFile change work 2013-09-22 16:50:27 -07:00
Keith Rothman
0f96ab0c6e [libbladeRF] Fixed double interface 1 set and fixed return code issues in lusb_load_fpga 2013-09-22 22:52:28 +00:00
Robert Ghilduta
5708a393af utilities: add an alternate method of determining the installed libusbx version
Sometimes check_function_exists does not work on Windows, it is then worth
testing to see if the LIBUSBX_API_VERSION is equal or greater than 0x01000102
(1.0.16). This version contains the neccessary libusb hotplug features needed to
make bladeRF-flash work.
2013-09-22 14:18:08 -07:00
litghost
727aab2a18 Added bladeRF-flash to TOC 2013-09-22 10:52:15 -07:00
litghost
a781b7ffdd Added link to forum post of forcing DFU mode 2013-09-22 10:50:29 -07:00
litghost
ddc40b1c26 Update README.md 2013-09-22 10:29:35 -07:00
litghost
c092b0e955 Added note in root level for bladeRF-flash and documentation for bladeRF-flash 2013-09-22 17:06:47 +00:00
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