EasyManua.ls Logo

Great Scott Gadgets HackRF - DFU Boot Mode for HackRF; Recovering SPI Flash Firmware; Obtaining DFU-Util Tool

Great Scott Gadgets HackRF
104 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
HackRF
6.3 Only if Necessary: DFU Boot
DFU boot mode is normally only needed if the firmware is not working properly or has never been installed.
The LPC4330 microcontroller on HackRF is capable of booting from several different code sources. By default,
HackRF boots from SPI flash memory (SPIFI). It can also boot HackRF in DFU (USB) boot mode. In DFU boot
mode, HackRF will enumerate over USB, wait for code to be delivered using the DFU (Device Firmware Update)
standard over USB, and then execute that code from RAM. The SPIFI is normally unused and unaltered in DFU mode.
To start up HackRF One in DFU mode, hold down the DFU button while powering it on or while pressing and releasing
the RESET button. Release the DFU button after the 3V3 LED illuminates. The 1V8 LED should remain off. At this
point HackRF One is ready to receive firmware over USB.
To start up Jawbreaker in DFU mode, short two pins on one of the “BOOT” headers while power is first supplied.
The pins that must be shorted are pins 1 and 2 of header P32 on Jawbreaker. Header P32 is labeled “P2_8” on most
Jawbreakers but may be labeled “2” on prototype units. Pin 1 is labeled “VCC”. Pin 2 is the center pin. After DFU
boot, you should see VCCLED illuminate and note that 1V8LED does not illuminate. At this point Jawbreaker is ready
to receive firmware over USB.
You should only use a firmware image with a filename ending in “.dfu” over DFU, not firmware ending in “.bin”.
6.4 Only if Necessary: Recovering the SPI Flash Firmware
If the firmware installed in SPI flash has been damaged or if you are programming a home-made HackRF for the first
time, you will not be able to immediately use the hackrf_spiflash program as listed in the above procedure. Follow
these steps instead:
1. Follow the DFU Boot instructions to start the HackRF in DFU boot mode.
2. Type dfu-util --device 1fc9:000c --alt 0 --download hackrf_one_usb.dfu to load firmware
from a release package into RAM. If you have a Jawbreaker, use hackrf_jawbreaker_usb.dfu instead. Alterna-
tively, use make -e BOARD=HACKRF_ONE RUN_FROM=RAM program to load the firmware into RAM and start
it.
3. Follow the SPI flash firmware update procedure above to write the “.bin” firmware image to SPI flash.
6.5 Obtaining DFU-Util
On fresh installs of your OS, you may need obtain a copy of DFU-Util. For most Linux distributions it should be
available as a package, for example on Debian/Ubuntu
sudo apt-get install dfu-util
If you are using a platform without a dfu-util package, build instruction can be found here on the dfu-util source forge
build page.
cd ~
sudo apt-get build-dep dfu-util
sudo apt-get install libusb-1.0-0-dev
git clone git://git.code.sf.net/p/dfu-util/dfu-util
cd dfu-util
./autogen.sh
./configure
(continues on next page)
20 Chapter 6. Updating Firmware

Table of Contents