Commit graph

475 commits

Author SHA1 Message Date
Ryan Tucker
d90dad8f74 lms_spi_controller: Remove inaccurate header comment 2013-09-22 11:17:08 -04:00
Ryan Tucker
151b78355e Rename hello_world_small.c to lms_spi_controller.c 2013-09-22 11:14:26 -04:00
Nuand
9638078ba4 Merge pull request #109 from litghost/fx3_cleanup_v3
Fx3 cleanup v3
2013-09-22 03:51:21 -07:00
Keith Rothman
83d4eb2c3c [libbladeRF] Removed incorrect free 2013-09-22 03:50:29 -07: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
d5cf78f627 [FX3] Fixed end-point halt 2013-09-22 08:07:08 +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 firmware-v1.4 firmware_v1.4 libbladeRF_v0.5.0
- 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
2fb5619b66 Updated CONTRIBUTORS file 2013-09-22 02:16:58 -04:00
Robert Ghilduta
1734184c3e fx3_firmware: speed up FPGA image bitflipping by using a lookup table
The bitflipping look takes about 180 instruction cycles to flip 1 byte. The new
method takes less than 5 clock cycles, making both images load times seem
almost instantenous. Further optimizations can be made by adding a Duff's
machine.
2013-09-21 21:03:17 -07:00
Jon Szymaniak
cc1e290422 libbladeRF: Fixed # samples parameter on initial TX callbacks (libusb backend) 2013-09-21 14:21:02 -04:00
Robert Ghilduta
5e995b88ca fx3_firmware: add SET_SEL (Select Exit Latency) handling 2013-09-21 07:30:50 -07:00
Nuand
f726d3b4ba Merge pull request #106 from litghost/fx3_cleanup_v2
Assorted fixes for problems found via USB30CV and USB20CV
2013-09-21 07:29:34 -07: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 libbladeRF_v0.4.0
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
Nuand
4aef5a0348 Merge pull request #96 from litghost/fx3_cleanup
FX3 cleanup and new flashing strategy
2013-09-14 22:38:09 -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
eec3ed35cf Bump FX3 firmware version firmware-v1.3 firmware_v1.3 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