Flashing the HackRF
SPI Firmware
hackrf_spiflash -w hackrf_one_usb.bin
CPLD Firmware
hackrf_cpldjtag -x firmware/cpld/sgpio_if/default.xsvf
Recovering
If the HackRF won’t start you might need to boot it via DFU and then reflash.
Press and hold reset, press and hold DFU, release reset, wait a little, release DFU.
dfu-util --device 1fc9:000c --alt 0 --download hackrf_one_usb.dfu
Then flash! :)