Commit graph

5 commits

Author SHA1 Message Date
Jon Szymaniak
a62a6bb7ba cli: First pass of CLI code cleanup
Another pass or two will definitely be required. So far, cleanup
includes:
  - Adding checks of libbladeRF return codes
  - Unifying the way errors are printed
  - Reorganizing command order (as they're searched linearly), by
    what's most time-sensitive.
  - Removed "specialized help" stubs. These can be re-added if/when
    this functionality is added
  - Removed some noisy warnings and replaced some with errors.
  - Script execution stops at first error encountered in script

Added:
  - "clear" command to clear terminal

Remaining issues:
  - We're still lacking a "run" command
  - Valgrind indicates we have some remaining issues in cli_err()
    that we should address.
2013-07-06 14:14:13 -07:00
Jon Szymaniak
15253274dc cli: Preliminary script support
Added support to run scripts from the command line. A 'run' command
still needs to be added. This will required a script stack and
detection of recursive loops.
2013-07-06 14:14:10 -07:00
Jon Szymaniak
888b3f0596 cli: Exit cleanly on SIGTERM, SIGINT, and SIGQUIT 2013-07-06 14:03:56 -07:00
Brian Padalino
ef2a542136 cli: Adding extra functionality.
lib: Added device path to bladerf structure to know where fd is pointing.
2013-07-06 04:50:37 -07:00
Jon Szymaniak
ec54e4e409 cli: Added FX3/ FPGA loading support and filled in misc. cmd stubs.
The CLI now supports flashing the FX3 and loading the FPGA from the
command line and through the interactive console.

To flash the firmware from the command line:
  ./bin/bladerf -b -f ./path/to/img -d /dev/bladerf1

To load the firmware from the command line:
  ./bin/bladerf -b -l ./path/to/rbf -d /dev/bladerf1

To flash/load interactively either run with -d /dev/bladerf1, or
use the open command to attach to a device:
  bladeRF> open /dev/bladerf1

To flash the firmware interactively:
  bladeRF> load fx3 ./path/to/img

To load the FPGA interactively:
  bladeRF> load fpga ./path/to/rbf

Note that a power-on-reset is currently required in between
flashing firmware and loading the FPGA.

Various commands have been stubbed out for the time being. A TODO
list has been created to keep track of desired functionality.

The simple_load and upgrade_firmware programs have been removed,
as they are no longer needed.
2013-06-17 00:12:19 -04:00