hackrf/firmware
Michael Ossmann 1945fca078
Some checks failed
Build / host (ubuntu-latest) (push) Failing after 7s
Build / firmware (JAWBREAKER, ubuntu-latest) (push) Failing after 14s
Check code style / clang-format (push) Failing after 4s
Build / firmware (RAD1O, ubuntu-latest) (push) Failing after 15s
Build / firmware (HACKRF_ONE, ubuntu-latest) (push) Failing after 23s
Check code style / clang-format-1 (push) Failing after 5s
Check code style / clang-format-2 (push) Failing after 6s
Check code style / clang-format-3 (push) Failing after 5s
Build / host (macos-latest) (push) Has been cancelled
Build / firmware (HACKRF_ONE, macos-latest) (push) Has been cancelled
Build / firmware (JAWBREAKER, macos-latest) (push) Has been cancelled
Build / firmware (RAD1O, macos-latest) (push) Has been cancelled
test clock frequency detection
2022-08-26 05:48:05 -04:00
..
blinky Add Windows build art(e|i)facts (#561) 2018-12-05 18:45:26 -07:00
common use timer to detect external clock frequency 2022-08-26 05:47:22 -04:00
cpld update README files for CPLD SRAM loading 2021-03-17 21:57:35 -06:00
hackrf_usb test clock frequency detection 2022-08-26 05:48:05 -04:00
libopencm3@6a301c81f4 update libopencm3 to avoid unsafe yaml.load() 2019-09-01 15:12:16 -06:00
tools CPLD: Add output for PortaPack C++ CPLD data. 2019-03-10 12:56:29 -07:00
.gitignore .gitignore additions: .dfu in /firmware, .pdf and .svg in /hardware 2013-03-07 14:56:32 -07:00
appveyor.sh Add Windows build art(e|i)facts (#561) 2018-12-05 18:45:26 -07:00
CMakeLists.txt Allow building from both firmware/build/ and firmware/hackrf_usb/build 2019-03-07 15:07:56 -07:00
dfu-util.cmake Firmware: no longer require dfu-prefix 2018-03-22 12:29:27 -06:00
dfu.py Firmware: no longer require dfu-prefix 2018-03-22 12:29:27 -06:00
hackrf-common.cmake use timer to detect external clock frequency 2022-08-26 05:47:22 -04:00
README update README files for CPLD SRAM loading 2021-03-17 21:57:35 -06:00
toolchain-arm-cortex-m.cmake Add Windows build art(e|i)facts (#561) 2018-12-05 18:45:26 -07:00

The primary firmware source code for USB HackRF devices is hackrf_usb.  Most of
the other directories contain firmware source code for test and development.
The common directory contains source code shared by multiple HackRF firmware
projects.  The cpld directory contains HDL source for the CPLD.


The firmware is set up for compilation with the GCC toolchain available here:

https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads

Required dependency:

https://github.com/mossmann/libopencm3

If you are using git, the preferred way to install libopencm3 is to use the
submodule:

$ cd ..
$ git submodule init
$ git submodule update

To build and install a standard firmware image for HackRF One:

$ cd hackrf_usb
$ mkdir build
$ cd build
$ cmake ..
$ make
$ hackrf_spiflash -w hackrf_usb.bin

If you have a Jawbreaker, add -DBOARD=JAWBREAKER to the cmake command.
If you have a rad1o, use -DBOARD=RAD1O instead.

It is possible to use a USB Device Firmware Upgrade (DFU) method to load
firmware into RAM.  This is normally only required to recover a device that has
had faulty firmware loaded, but it can also be useful for firmware developers.

For loading firmware into RAM with DFU you will need:

http://dfu-util.sourceforge.net/

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.

A .dfu file is built by default when building firmware.  Alternatively you can
use a known good .dfu file from a release package.  Load the firmware into RAM
with:

$ dfu-util --device 1fc9:000c --alt 0 --download hackrf_usb.dfu