libbladeRF  1.1.0
Nuand bladeRF library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Functions
Bootloader Recovery

Functions

API_EXPORT int CALL_CONV bladerf_get_bootloader_list (struct bladerf_devinfo **list)
 
API_EXPORT int CALL_CONV bladerf_load_fw_from_bootloader (const char *device_identifier, bladerf_backend backend, uint8_t bus, uint8_t addr, const char *file)
 

Detailed Description

These functions provide the ability to identify devices enumerating as an FX3 bootloader, download firmware to RAM, and then execute the firmware.

Care should be taken to ensure that devices operated on are indeed a bladeRF, as opposed to another FX3-based device running in bootloader mode.

Function Documentation

API_EXPORT int CALL_CONV bladerf_get_bootloader_list ( struct bladerf_devinfo **  list)

Get a list of devices that are running the FX3 bootloader.

After obtaining this list, identify the device that you would like to load firmware onto. Save the bus and address values so that you can provide them to bladerf_load_fw_from_bootloader(), and then free this list via bladerf_free_device_list().

Parameters
[out]listUpon finding devices, this will be updated to point to a list of bladerf_devinfo structures that describe the identified devices.
Returns
Number of items populated in list, or an error value from the Error codes list on failure
API_EXPORT int CALL_CONV bladerf_load_fw_from_bootloader ( const char *  device_identifier,
bladerf_backend  backend,
uint8_t  bus,
uint8_t  addr,
const char *  file 
)

Download firmware to the specified device that is enumarating an FX3 bootloader, and begin executing the firmware from RAM.

Note that this function does not write the firmware to SPI flash. If this is desired, open the newly enumerated device with bladerf_open() and use bladerf_flash_firmware().

Parameters
device_identifierDevice identifier string describing the backend to use via the <backend>:device=<bus>:<addr> syntax. If this is NULL, the backend, bus, and addr arguments will be used instead.
backendBackend to use. This is only used if device_identifier is NULL.
busBus number the device is located on. This is only used if device_identifier is NULL.
addrBus address the device is located on. This is only used if device_identifier is NULL.
fileFilename of the firmware image to boot
Returns
0 on success, value from Error codes list on failure