Commit graph

600 commits

Author SHA1 Message Date
Brian Padalino
d3e1fa0333 libbladeRF: Fix warning due to unused variable. 2013-10-13 11:33:22 -04:00
Brian Padalino
6331b06d9f libbladeRF: Change where initialization occurs. 2013-10-13 10:16:37 -04:00
Robert Ghilduta
17110d1ca2 libbladeRF: type fixup for MSVS 2013-10-13 02:04:03 -07:00
Jon Szymaniak
b797ee32d3 Added tags & TAGS to gitignore 2013-10-13 00:23:03 -04:00
Robert Ghilduta
2ff803b77c libbladeRF: fix to get FPGA flashing working with byte change to flash API 2013-10-12 19:06:15 -07:00
Robert Ghilduta
3e1748916a Merge branch 'DanielG-dev-flash-addressing'
Conflicts:
	host/libraries/libbladeRF/src/backend/libusb.c
2013-10-12 17:56:12 -07:00
Brian Padalino
130cbbaebc libbladeRF: Fix coverity defect and change checks.
Checking against 0 is a bit more clear.  Negative logic always
seems to get to me.
2013-10-10 21:49:34 -04:00
Brian Padalino
b788804ed7 cli: Change FPGA flash case comparison. 2013-10-09 23:35:55 -04:00
Brian Padalino
98a3d27be4 Cleanup FPGA autoloading.
Initialize the device if a default value is seen on the GPIO
config pins.

Fix up some coverity and samplerate floating point exception
bugs in the si5338 code.

Change the flash FPGA option to be -L instead of -H.

Make the version strings be long options only, no short ones.
2013-10-09 22:30:08 -04:00
Daniel Gröber
22f48f3cfb libbladeRF: fixup flash adresses in bladerf_flash_fpga 2013-10-09 13:53:21 +02:00
Daniel Gröber
c0f2a3682e libbladeRF: fix merge errors 2013-10-09 12:54:19 +02:00
Daniel Gröber
89a05274e2 Merge master into dev-flash-addressing (using imerge) 2013-10-09 12:21:37 +02:00
Robert Ghilduta
f5b2d99f13 libbladeRF: correct bounds checking error
Directly combining page offsets and bytes does not yield correct answers.
2013-10-09 01:11:08 -07:00
Robert Ghilduta
53bc104baf libraries: add encode_field() function
This function is the inverse of extract_field(). It creates binary blobs that
can be interpreted by encode_field().
2013-10-09 01:11:08 -07:00
Robert Ghilduta
5c9ffb6351 fx3_firmware: add FPGA flash based auto-load functionality
The FX3 will now look at sector 1024 to determine if there is an image for it
to load from flash. In case there is, it will configure the SPI controller,
enter FPGA config mode, and override the DMA engine to load the image.
2013-10-09 01:11:08 -07:00
Robert Ghilduta
37df2984e1 libbladeRF: add FPGA flash autoload functionality
This commit adds the command line and libbladeRF support for flashing an image
to flash so that the bladeRF will auto-load the image when it boots. An rbf can
be loaded by running `bladeRF-cli -H ./hostedx40.rbf`. This will cause the FX3
firmware to load the FPGA image from flash the next time the unit boots, this
should not cause any problems reprogramming the device after it's already
loaded. To disable the auto-load feature after enabling it run
`bladeRF-cli -H X`, this destroys the FPGA image stored in flash.
2013-10-09 01:11:08 -07:00
Robert Ghilduta
7b718b050b fx3/makefile: fixup building on Windows
There is no touch.exe that ships with the SDK on Windows, touch must not be used
in the Makefile. mkdir can also exit with status code 1, indicating it cannot
create an already existing directory, this should not stop the build from
continuing.
2013-10-09 01:11:08 -07:00
Robert Ghilduta
a0667c23c2 fx3_firmware: change GPIF loader to be a 16bit wide bus
This change is needed by the flash based FPGA autoloader because it requires
access to the GPIF and SPI at the same time.
2013-10-09 01:11:07 -07:00
Robert Ghilduta
b37992c708 fx3_firmware: add "Fast Read" functionality
Sometimes (when we only read from the device) when we want speed and only read
from the flash it is useful to ignore certain parts of the read procedure.
Generally a SPI call should not finish unless CyFxSpiWaitForStatus() will return
immediately on the next invocation.
2013-10-09 01:11:07 -07:00
Nuand
b80d31f57a Merge pull request #140 from rtucker/host_readme_link_fix
Fix duplicate link IDs for 'cmake'
2013-10-05 18:11:01 -07:00
Ryan Tucker
dad8f38839 Fix duplicate link IDs for 'cmake' 2013-10-05 21:01:24 -04:00
Nuand
35dc33cc56 Merge pull request #139 from rtucker/findlibusb_cmake_add_pkg-config_warning
Warn the user if pkg-config isn't installed
2013-10-05 18:00:06 -07:00
Ryan Tucker
c27a67fa63 Warn the user if pkg-config isn't installed
Helpfully suggest installing pkg-config if FindLibUSB.cmake fails.
This change should not impact the build mechanics.
2013-10-05 20:53:43 -04:00
Brian Padalino
696b018e5a Revert "fx3: Create elf2img in output dir."
This reverts commit 94c23fe0e8.
2013-10-05 15:38:38 -04:00
Brian Padalino
0f3a35375d libbladeRF: Replace __func__ with __FUNCTION__. 2013-10-05 15:27:23 -04:00
Brian Padalino
e50a544ba4 libbladeRF: Frequency tuning update. 2013-10-05 13:40:23 -04:00
Brian Padalino
daf20fce65 libbladeRF: Modified tuning algorithm.
Changed the tuning algorithm to try to minimize accesses to the
peripheral.  Not 100% convinced it comes up with the same results as the
original algorithm, so both are back-to-back currently.
2013-10-05 13:40:22 -04:00
Brian Padalino
8be42467af libbladeRF: Log debug instead of info.
Logging debug messages as debug messages instead of info messages.
2013-10-05 13:08:36 -04:00
Brian Padalino
75ef559cb7 libbladeRF: Fixed #128.
Do not assert in the callback stream, but output some warning messages
in case the sample stream does not have a valid integer number of samples.
2013-10-05 12:59:33 -04:00
Brian Padalino
94c23fe0e8 fx3: Create elf2img in output dir. 2013-10-05 12:02:27 -04:00
Brian Padalino
8f2675ec17 Merge branch 'cleaner_tree' of https://github.com/litghost/bladeRF into litghost-cleaner_tree 2013-10-05 11:57:14 -04:00
Jon Szymaniak
3f8a176a17 bladeRF-cli: Added info command
This command moves some non-version items out of the "version" command,
and also prints information from a device's associated bladerf_devinfo.

Related changes to tracked files snuck in on me in
cf552e30e5.
2013-10-05 03:08:56 -04:00
Jon Szymaniak
3168175f48 linux_driver: Applied structure renaming from ab36a93813 2013-10-05 02:40:53 -04:00
Keith Rothman
d0d2dad9ae Build system fixes
Put version.h in build directory
Fixed out of source build not being completely out-of-source (version.h)
2013-10-05 06:34:45 +00:00
Jon Szymaniak
cf552e30e5 fx3_firmware: Fixed string index error introduced in 58c13c65a8 bladeRF-cli_v0.5.0 firmware_v1.5.3 2013-10-05 01:35:48 -04:00
Keith Rothman
4797ac08b5 Moved settings.bsp out of the path 2013-10-04 22:31:31 -07:00
Keith Rothman
7bf2e18107 Build cleanup: Removed what appear to be temporary files and moved ELF2IMG to OUTPUT_DIR 2013-10-04 22:15:38 -07:00
Jon Szymaniak
5cb9e611fb fx3_firmware: Moved and renamed ExtractSerial() for better readability firmware_v1.5.2 2013-10-05 00:42:41 -04:00
Brian Padalino
14f33b4055 libbladeRF: Fixed issue #134.
Function now checks the module before calling either the LNA select or
PA enable function.
2013-10-05 00:25:37 -04:00
Jon Szymaniak
79739443a5 conversions: Addressed potential (unlikely) truncation in str2uint
'value' could have be truncated on systems where sizeof(unsigned long) >
sizeof(unsigned int). As it is unlikely that someone will use such a
system, this is mainly to keep consistent with the other functions in
this file.
2013-10-04 23:30:14 -04:00
Jon Szymaniak
3c032df669 fx3_firmware: Fixed build error introduced in 58c13c65a8
58c13c65a8 added a call to the
ExtractSerial() function before it was defined.
2013-10-04 22:55:51 -04:00
Jon Szymaniak
8b8596e5ee bladeRF-cli: Cleaned up output for "version" command bladeRF-cli_v0.4.2
Indented output. A less ugly message is printed when no device is
attached.
2013-10-04 21:07:13 -04:00
Jon Szymaniak
575bf0e4cd bladeRF-flash: Removed self-assignment
Resulted in warning that breaks build with Clang (3.2.1), via -Werror
2013-10-04 21:07:09 -04:00
Jon Szymaniak
db5bac4c7a common: Fixed warnings the broke Windows build (with /WX) 2013-10-04 20:43:53 -04:00
Jon Szymaniak
e349d348a5 libbladeRF: Fixed memory leak, cleaned up deinits in failure cases libbladeRF_v0.6.2
The FPGA and FW versions were not being freed in lusb_close(). Some
potential leaks existed in failure cases.
2013-10-04 19:42:40 -04:00
Jon Szymaniak
58c13c65a8 fx3_firmware, libbladeRF: Packed FW version structure, moved serial # init firmware_v1.5.1 libbladeRF_v0.6.1
The bladerf_fx3_version structure is transferred as-is. Currently this
likely doesn't pose any isseus for most machines, since it contains only
two uint32_t's. It's now marked to be packed, just to be safe.

The serial number initialization (ExtracSerial()) has been moved before
the CyU3PConnectState() call to remove a potential race condition.

Macro definitions are now provided for string descriptors.
2013-10-04 19:28:35 -04:00
Jon Szymaniak
f6dda44e9b Merge pull request #135 from rtucker/fx3_cmakelists_minimum_vers_fix
Fix cmake_minimum_required (CMAKE_CURRENT_LIST_DIR is >=2.8.3)
2013-10-04 16:00:25 -07:00
Ryan Tucker
457c1e97df Fix cmake_minimum_required (CMAKE_CURRENT_LIST_DIR is >=2.8.3) 2013-10-04 18:49:14 -04:00
Jon Szymaniak
22f9f48bb0 fx3_firmware: Removed debug output and stray line in makefile 2013-10-03 23:19:18 -04:00
Jon Szymaniak
ab36a93813 libbbladeRF, utilities: Migrating to major.minor.patch for version #'s bladeRF-cli_v0.4.1 libbladeRF_v0.6.0
The API now presents a version structure that includes major, minor, and
patch versions. It additionally provides a "describe" string which
includes these version items in a string format, with any additional
annotations (such as git revision and dirty flag).

This changeset removes the older version functions, breaking reverse
compatibility (intentionally). Bumped minor version to reflect this change.
(The 0.Y.Z series is considered unstable at this time.)
2013-10-03 22:50:43 -04:00