bladeRF/host
Jon Szymaniak b7c335a69a Merge branch 'dev-libusb_support' into bladerf
This merge introduces libusb-1.0 support into libbladeRF. This is now
preferred over the Linux driver backend for the time being, as it will
allow quicker ports to Windows and OSX. The Linux driver will be
significantly refactored and improved at a later time; it is not
recommended for use with this set of changes.

As of this commit, Windows and OSX builds are still works in progress.
Linux builds have been tested and verified.

** Important **
This branch also introduces CMake support, code base reorganization, and
significant API changes. Please review the updated API header (best viewed
via the Doxygen-generated html files.)

If you've been working out of the bladerf branch, it is recommended that
you clean up the following:

1. Uninstall Linux kernel module, if you have it loading at boot
2. Remove installed libbladeRF files (libbladeRF.h, pkg-config, files, .so's)
3. Remove installed CLI program
4. Remove udev rules

Please review the new "Getting started" text and the instructions in the
README.md and  host/README.md files for the new build procedure.

Manually resolved Conflicts:
	README.md
	host/drivers/linux/bladeRF.c
	host/utilities/bladeRF-cli/src/interactive/interactive.h
	linux/lib/src/bladerf.c
2013-08-25 13:53:13 -04:00
..
cmake host: Fixed build items broken by Windows build-related commits. 2013-08-25 11:16:07 -04:00
common host: Fixed build items broken by Windows build-related commits. 2013-08-25 11:16:07 -04:00
drivers Merge branch 'dev-libusb_support' into bladerf 2013-08-25 13:53:13 -04:00
libraries Merge branch 'dev-libusb_support' into bladerf 2013-08-25 13:53:13 -04:00
misc udev: Single rule for both libusb and Linux driver-based support. 2013-08-22 21:26:22 -04:00
utilities libbladeRF: Renamed configuration GPIO read/write functions 2013-08-25 12:27:25 -04:00
CMakeLists.txt host: Added stdbool.h for msvc builds 2013-08-24 18:22:15 -04:00
README.md Updated README.md's, moved utilities/cli -> utilities/bladeRF-cli 2013-08-17 13:03:21 -04:00

bladeRF Host Source

This directory contains the items outlined in the following table. Note that this structure includes some items planned for future development.

Directory Description
cmake CMake scripts and modules
drivers Device drivers for supported operating systems
libraries The main bladeRF support library and supplemental libraries
misc Miscellaneous files
utilities Applications and tools

Dependencies

libUSB

libusb-1.0 and its development headers are required. >= v1.0.12 is recommended for Linux, and >= v1.0.13 is recommended for Windows. Ideally, the latest released version is always recommended. Please see the libusb ChangeLog for more information.

CMake

CMake is used to build the items in this directory.

Ubuntu/Debian:

sudo apt-get install libusb-1.0.0 libusb-1.0.0-dev cmake

Build

From this directory, create a 'build' directory. This is personal preference, of course. It allows for all build files to be cleaned up via a single rm -r build/ command. Next, run cmake to configure the build, followed by make and sudo make install to build and install libraries and applications.

mkdir -p build
cd build
cmake [options] ../
make
sudo make install

Below is a list of useful and project-specific CMake options. Please see the CMake variable list in CMake's documentation for more information.

Option Description
-DCMAKE_BUILD_TYPE=<type> Set to "Debug" to enable a debug build. "Release" is the default.
-DCMAKE_C_COMPILER=<compiler> Specify the compiler to use. Otherwise, CMake will determine a default.
-DENABLE_GDB_EXTENSIONS=<ON/OFF> GCC & GDB users may want to set this to use -ggdb3 instead of -g. Disabled by default.
-DENABLE_BACKEND_LIBUSB=<ON/OFF> Enables libusb backend in libbladeRF. Enabled by default.
-DENABLE_BACKEND_LINUX_DRIVER=<ON/OFF> Enables Linux driver in libbladeRF. Disabled by default.
-DENABLE_INTERACTIVE_TECLA=<ON/OFF> Enable bladeRF-cli interactive mode support via libtecla. Enabled by default.
-DINSTALL_UDEV_RULES=<ON/OFF> Install udev rules to /etc/udev/rules.d/. Disabled by default.