hackrf/firmware
Martin Ling 9153f3d55e
Some checks failed
Build / host (3.10.0, map[os:ubuntu shell:bash]) (push) Failing after 8s
Build / host (3.16.0, map[os:ubuntu shell:bash]) (push) Failing after 9s
Build / host (3.21.0, map[os:ubuntu shell:bash]) (push) Failing after 8s
Build / host (4.0.0, map[os:ubuntu shell:bash]) (push) Failing after 4s
Build / host (latest, map[os:ubuntu shell:bash]) (push) Failing after 5s
Build / firmware (HACKRF_ONE, 3.12.0, ubuntu) (push) Failing after 6s
Build / firmware (HACKRF_ONE, latest, ubuntu) (push) Failing after 5s
Build / firmware (JAWBREAKER, 3.12.0, ubuntu) (push) Failing after 6s
Build / firmware (JAWBREAKER, latest, ubuntu) (push) Failing after 8s
Build / firmware (PRALINE, 3.12.0, ubuntu) (push) Failing after 9s
Build / firmware (PRALINE, latest, ubuntu) (push) Failing after 7s
Build / firmware (RAD1O, 3.12.0, ubuntu) (push) Failing after 7s
Build / firmware (UNIVERSAL, 3.12.0, ubuntu) (push) Failing after 6s
Build / firmware (RAD1O, latest, ubuntu) (push) Failing after 8s
Build / firmware (UNIVERSAL, latest, ubuntu) (push) Failing after 10s
Check code style / clang-format-1 (push) Failing after 9s
Check code style / clang-format (push) Failing after 11s
Check includes / includes-check (HACKRF_ONE, 3.12.0) (push) Failing after 6s
Check code style / clang-format-2 (push) Failing after 11s
Check code style / clang-format-3 (push) Failing after 9s
Check includes / includes-check (JAWBREAKER, 3.12.0) (push) Failing after 2s
Check includes / includes-check (HACKRF_ONE, latest) (push) Failing after 4s
Check includes / includes-check (JAWBREAKER, latest) (push) Failing after 3s
Check includes / includes-check (PRALINE, 3.12.0) (push) Failing after 3s
Check includes / includes-check (PRALINE, latest) (push) Failing after 3s
Check includes / includes-check (RAD1O, 3.12.0) (push) Failing after 3s
Check includes / includes-check (RAD1O, latest) (push) Failing after 2s
Check includes / includes-check (UNIVERSAL, 3.12.0) (push) Failing after 4s
Check includes / includes-check (UNIVERSAL, latest) (push) Failing after 3s
Build / host (3.10.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.16.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (latest, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (latest, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.21.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (3.21.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (4.0.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (4.0.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (latest, --install-prefix=/usr/local, map[os:windows shell:msys2]) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, windows) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, windows) (push) Has been cancelled
Build / firmware (PRALINE, 3.12.0, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, windows) (push) Has been cancelled
Build / firmware (RAD1O, latest, windows) (push) Has been cancelled
Build / firmware (UNIVERSAL, 3.12.0, macos) (push) Has been cancelled
Build / firmware (UNIVERSAL, latest, macos) (push) Has been cancelled
Build / firmware (UNIVERSAL, latest, windows) (push) Has been cancelled
Use PLL B for MCU_CLKIN on Praline.
2026-06-11 20:23:35 +01:00
..
blinky Express all delays as delay_us() or delay_ms(). 2026-06-02 16:55:17 +01:00
common Use PLL B for MCU_CLKIN on Praline. 2026-06-11 20:23:35 +01:00
cpld update README files for CPLD SRAM loading 2021-03-17 21:57:35 -06:00
fpga gateware: add configurable mixer to RX extended precision 2026-04-01 17:43:33 +02:00
hackrf_usb Merge pull request #1751 from martinling/si5351c-next 2026-06-09 11:27:04 -04:00
libopencm3@a0bb997968 Update libopencm3 for recent compiler warning fixes. 2026-02-09 19:08:06 +00:00
tools Add script to extract font data to an image file for editing. 2026-05-18 14:42:16 +01: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 firmware: bump CMake requirement to 3.12. 2026-05-07 14:38:39 +02: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 firmware: move platform preprocessor definitions to cmake 2026-05-07 14:38:38 +02:00
include-what-you-use.cmake Fix IWYU --keep syntax for compatibility with 0.22 2026-05-07 18:56:53 -04:00
libopencm3.imp repo: add include-what-you-use mapping file for libopencm3 2026-04-02 14:16:24 +02:00
platform-detect.cmake firmware: move platform preprocessor definitions to cmake 2026-05-07 14:38:38 +02:00
README Add HackRF Pro to firmware/README 2025-12-30 20:13:04 -05: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 HackRF Pro, add -DBOARD=PRALINE to the cmake command.
If you have a Jawbreaker, add -DBOARD=JAWBREAKER to the cmake command.
If you have a rad1o, use -DBOARD=RAD1O instead.

If you get the "`arm-none-eabi-gcc` is not a full path and was not found in the PATH"
error during `cmake ..`, install the
[ARM GNU toolchain](https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain).
This toolchain is pre-packaged on many platforms and distributions, e.g. on Debian/Ubuntu
you can run `sudo apt-get install gcc-arm-none-eabi` to install it.

If you get the "ModuleNotFoundError: No module named 'yaml'" error during `make`,
run `pip install pyyaml` to install the Python yaml pip package.

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 or HackRF Pro 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