Commit graph

238 commits

Author SHA1 Message Date
Jon Szymaniak
df05b174ec libbladeRF & bladeRF-CLI: Fixed build issues. Moved backend config info.
From henceforth, all backend selection should live in the
backend_config.h.in file, so backend.c or backend.h doesn't get muddied
with #ifdef's.
2013-08-13 23:44:42 -04:00
Robert Ghilduta
38a921e13b flash read, calibration stuff too 2013-08-13 01:47:12 -04:00
Robert Ghilduta
772391903d add otp read stuff 2013-08-13 01:47:12 -04:00
Jon Szymaniak
96618b8479 udev_rules: bladeRF rules that should have been in previous commit 2013-08-13 01:33:28 -04:00
Jon Szymaniak
e303076921 First cut at functioning CMake setup (Linux-only) libbladeRF_v0.3.0
Further revisions will be needed to do some cleanup, as well as
address Windows & OSX support.
2013-08-13 01:24:58 -04:00
Jon Szymaniak
bb49ba4c10 libbladeRF: Changed some CMake debug build compiler options 2013-08-12 21:49:12 -04:00
Jon Szymaniak
6323d15990 libbladeRF & CLI: [WIP] In the process of switching over to CMake
*Warning:* This is a broken nightly commit.

If not obvious, quite a bit of rearranging has been done.

The build script(s) for libbladeRF is mostly complete. This still
requires further configuration of debug builds and version info being
used to populate a version header.

Some cleanup has been done in the (formerly apps, now) utilities
directory. There's no CMake support in here yet...that's comming in the
next commit.
2013-08-12 03:24:16 -04:00
Jon Szymaniak
f8233c9476 libbladeRF & CLI: [WIP] Added FW version support (CLI & libusb backend) 2013-08-11 19:07:39 -04:00
Jon Szymaniak
9a466b6978 libbladeRF: [WIP] Added CLI version command and 'dummied' FPGA version)
The FPGA does not currently have a version number -- this is dummied out
in the lib. (Fixed uninitialized vars in libusb backend)
2013-08-11 18:21:54 -04:00
Jon Szymaniak
589860e0e7 libbladeRF: [WIP] Fixed backend_probe()'s false positive errors.
This routine was indicating an error occurred because the last
backend checked could return BLADERF_ERR_NODEV.
2013-08-11 18:10:48 -04:00
Jon Szymaniak
b83bccb9ab libbladeRF: Fixed behavior of CLI's 'status and exit' items. 2013-08-11 17:43:56 -04:00
Jon Szymaniak
a41fb0fe5e libbladeRF: [WIP] Fixed crash when no devicesa are attached
The libusb backend was not returning BLADERF_ERR_NODEV when it
failed to find any devices, resulting in a status code of 0 with
a NULL device.
2013-08-11 17:33:59 -04:00
Jon Szymaniak
66e5ffa301 libbladeRF: [WIP] Changed BLADERF_ERR_NODEV string 2013-08-11 16:52:53 -04:00
Jon Szymaniak
27415d37a5 libbladeRF: [WIP] Fixed overrun in (linux backend) FPGA programming 2013-08-11 16:32:50 -04:00
Jon Szymaniak
77f8aadb25 libbladeRF: [WIP] Cleanup of backend open and probe 2013-08-11 15:52:08 -04:00
Jon Szymaniak
12c942ab51 libbladeRF: [WIP] Fixed NULL dereference in Linux backend.
Status of 0 + no devices returned was resulting in an attempt to
initialize NULL device.
2013-08-10 18:57:06 -04:00
Jon Szymaniak
2288858aaf libbladeRF: [WIP] Changed bladerf_open() interfaces to return status.
The open routines now return status, allowing the caller to
differentiate between I/O failures and an invalid device specifier.

This commit still contains some in-progress known bugs with
some (avoidable) invalid memory accesses.
2013-08-10 18:19:16 -04:00
Jon Szymaniak
ee919d3aa1 libbladeRF: [WIP] Fixed a bugs in FX3 flashing (libusb backend)
Also included is the addition of a get_device_speed() to the
backend function table. Querying the device speed has been moved out
of the backend open() routines, and up to the top-level in bladerf.c.
2013-08-10 13:52:01 -04:00
Jon Szymaniak
28bfd30de5 libbladeRF: [WIP] *UNTESTED* Added FX3 flashing to libusb backend
Commiting to sync up for a dev sprint today. If you're pulling HEAD
to test out the latest and greatest, you'll likely want to avoid this
changest for the time being.
2013-08-10 10:07:56 -04:00
Jon Szymaniak
0d74b081c0 libbladeRF: [WIP] Finished up linux_open()
It appears that reading back the USB bus and address has some issues.
(Confirmed for the linux backend and libusb backend.)
2013-08-08 03:02:28 -04:00
Jon Szymaniak
46c7e5ae60 libbladeRF: [WIP] Added BLADE_GET_SPEED to linux backend. Misc cleanup.
On the cleanup side of things...just a bit of rearranging things, init
routines, and moving some items from backend code to the top-level to
avoid code duplication.
2013-08-08 00:30:41 -04:00
Jon Szymaniak
dcdf944de2 libbladeRF: [WIP] Finished up backend probe() implementations
Resolved segfaults and memory leaks introduced in last few commits.
2013-08-07 23:32:17 -04:00
Jon Szymaniak
4dae459b66 linux_driver: Added bus/addr ioctl() support & corrected return values
Added the following ioctl() items:
  BLADE_GET_BUS  - Get the bus number the device is attached to
  BLADE_GET_ADDR - Get the device's address on the bus

The ioctl() return values for copy_to_user()s were directly coming from
copy_to_user. In the case that copy_to_user() fails, -EFAULT is
returned.
2013-08-07 22:47:02 -04:00
Jon Szymaniak
a78d303705 libbladeRF: [WIP] Additional progress on linux backend probe.
This is not functional
2013-08-06 23:21:58 -04:00
Brian Padalino
84bdf1be81 cli: [WIP] Builds. Segfaults. 2013-08-06 23:13:37 -04:00
Brian Padalino
4a7656adf4 libusb: [WIP] Probe modifications. 2013-08-06 22:58:04 -04:00
Jon Szymaniak
d35f1cadae libbladeRF: [WIP] Moved "old" code down to linux backend 2013-08-06 22:32:56 -04:00
Jon Szymaniak
876566b44d libbladeRF: [WIP] In the process of adding backend probe() routines
This commit is a developer sync up -- it has not been built or tested.
2013-08-06 22:11:33 -04:00
Brian Padalino
61cd4ba3d9 lib: Change the FPGA programmer to always set the appropriate interface before attempting to program. 2013-08-06 21:43:24 -04:00
Jon Szymaniak
4f7092402b libbladeRF: [WIP] Removed extraneous device init from linux backend.
A couple little non-functional macro changes in the libusb backend as
well...
2013-08-06 00:37:11 -04:00
Jon Szymaniak
bba53afe0a libbladeRF: [WIP] Changed return values for libusb backend's fpga prog
By returning the result, notably from end_fpga_programming(), we
wind up returning a non-zero return value where 0=success and <0=error
are expected.

However, I'm not sure we should be checking the result from the vendor
command response in these routines. Would it be a good idea to
ensure the FPGA is reset after issuing BLADE_USB_CMD_BEGIN_PROG?

There is a FPGA status poll loop afterwards, so I'm inclined to say
we can ignore the fpga status in the end programming command.
2013-08-06 00:15:22 -04:00
Jon Szymaniak
91b95f6acb libbladeRF: [WIP] Fixed a few bad pointer dereferences and assertions 2013-08-05 01:35:13 -04:00
Brian Padalino
02cd151115 lib: libusb backend should be able to tx/rx samples now. 2013-08-05 00:08:33 -04:00
Jon Szymaniak
e9d4469af5 libbladeRF: [WIP] Removed debug print 2013-08-04 23:43:55 -04:00
Jon Szymaniak
e959b3d4e6 libbladeRF: [WIP] Added linux-backend firmware flashing 2013-08-04 23:37:30 -04:00
Brian Padalino
14657308d6 cli+lib: TX/RX interface changes. 2013-08-04 22:18:06 -04:00
Jon Szymaniak
5e09b1fc20 CLI: Updated help text for device specifier 2013-08-04 22:12:43 -04:00
Jon Szymaniak
79a8bccb60 libbladeRF: [WIP] Fixed use after free in libusb backend error handling 2013-08-04 21:56:57 -04:00
Brian Padalino
460fd4d672 cli+lib: [WIP] libusb and cli changes.
Currently the FPGA loads and register reads/writes work.

Need to get samples sending/receiving.
2013-08-04 21:51:59 -04:00
Jon Szymaniak
12e6a024d9 libbladeRF: [WIP] Added driver workaround in FPGA loading 2013-08-04 21:38:13 -04:00
Brian Padalino
cb7766d1bd backend/libusb: Open and close now works. 2013-08-04 19:44:07 -04:00
Jon Szymaniak
f8b555c733 libbladeRF: [WIP] File read output params now updated. 2013-08-04 17:29:41 -04:00
Jon Szymaniak
c6258c4b6e libbladeRF: [WIP] Moved devinfo match routines to bladerf_priv 2013-08-04 16:36:13 -04:00
Jon Szymaniak
7766af1880 libbladeRF: [WIP] Moved a few snippets from linux backend to top level. 2013-08-04 14:10:52 -04:00
Jon Szymaniak
82a47b2a4a libbladeRF: Implemented & stubbed out part of linux backend open() 2013-08-03 03:02:56 -04:00
Jon Szymaniak
6157f564ac libbladeRF: [WIP] Fixed str2devinfo and test.c bugs 2013-08-03 02:26:06 -04:00
Jon Szymaniak
53b7e3d763 libbladeRF: [WIP] Tweak naming of device identifier routine(s) 2013-08-03 01:50:13 -04:00
Jon Szymaniak
c323fb553d libbladeRF: [WIP] First cut at path from top-level to backend opens
Nightly check-in. This currently fails to run - there's likely
a number of assertion failures and segfaults to address.
2013-08-03 01:23:03 -04:00
Jon Szymaniak
1c13addd1d libbladeRF: [WIP] Planned bladerf_open out, misc interface cleanup. 2013-08-02 21:27:25 -04:00
Jon Szymaniak
103c7214d2 libbladeRF: [WIP] Added file_ops.c/h
Common file operations will be tucked in here to allow them to
be easily dummied out for NIOS build without making a mess of
bladerf.c.
2013-08-02 21:25:54 -04:00