Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5120383
Universalize: platform_gpio.{c,h}
martinling Apr 3, 2026
6176dbc
Universalize: platform_scu.{c,h}
martinling Apr 3, 2026
d0ac318
Universalize: cpld_jtag.{c,h}
martinling Apr 3, 2026
8d4570d
Universalize: max283x.{c,h}
martinling Apr 3, 2026
c913e81
Universalize: rffc5071.{c,h}
martinling Apr 3, 2026
cfd7295
Universalize: si5351.c
martinling Apr 3, 2026
cdc17d5
Universalize: rf_path.{c,h}
martinling Apr 3, 2026
3aaa718
Universalize: mixer.{c,h}, usb_api_register.c
martinling Apr 3, 2026
275b75f
Universalize: tuning.{c,h}, tune_config.h
martinling Apr 3, 2026
233951c
Universalize: hackrf_ui.c
martinling Apr 3, 2026
9285573
Universalize: operacake_sctimer.c
martinling Apr 3, 2026
ed1a4d0
Universalize: w25q80bv.c
martinling Apr 3, 2026
54dfdd9
Universalize: sgpio.{c,h}
martinling Apr 3, 2026
6c4023e
Universalize: radio.c
martinling Apr 3, 2026
938c020
Universalize: hackrf_core.{c,h}, selftest.h
martinling Apr 4, 2026
85dfacf
Universalize: firmware/hackrf_usb
martinling Apr 4, 2026
3faa91e
Add UNIVERSAL board target.
martinling Apr 4, 2026
6387a0b
Add UNIVERSAL firmware build to GitHub Actions.
martinling Apr 2, 2026
421af49
Jenkinsfile: add tests with BOARD=UNIVERSAL.
martinling Apr 2, 2026
9b5f342
max283x: Move platform switch inside max283x_setup().
martinling Apr 6, 2026
d4b2091
max283x: Add macros to simplify variant-specific dispatch.
martinling Apr 6, 2026
439f6fd
firmware: Use macros to simplify platform-specific code.
martinling Apr 15, 2026
7a6b099
firmware: Separate compile-time and runtime platform checks.
martinling Apr 9, 2026
f7a3d43
Use IS macros for all conditional compilation.
martinling Apr 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:
strategy:
matrix:
os: ['macos', 'ubuntu', 'windows']
board: ['HACKRF_ONE', 'JAWBREAKER', 'RAD1O', 'PRALINE']
board: ['HACKRF_ONE', 'JAWBREAKER', 'RAD1O', 'PRALINE', 'UNIVERSAL']
cmake: ['3.10.0', 'latest']
exclude:
- os: 'windows'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/includes-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
options: --user 0
strategy:
matrix:
board: ['HACKRF_ONE', 'JAWBREAKER', 'RAD1O', 'PRALINE']
board: ['HACKRF_ONE', 'JAWBREAKER', 'RAD1O', 'PRALINE', 'UNIVERSAL']
cmake: ['3.10.0', 'latest']

# Don't cancel all builds when one fails
Expand Down
72 changes: 72 additions & 0 deletions Jenkinsfile
Comment thread
martinling marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,46 @@ pipeline {
}
}
}
stage('Test HackRF One with BOARD=UNIVERSAL') {
agent {
docker {
image 'hackrf'
reuseNode true
args docker_args
}
}
options {
timeout(time: 20, unit: 'MINUTES')
}
steps {
sh './ci-scripts/install_host.sh'
sh './ci-scripts/build_firmware.sh UNIVERSAL'
script {
allOff()
reset('h1_eut')
}
sh 'sleep 1s'
retry(3) {
sh './ci-scripts/test_host.sh'
}
script {
reset('h1_tester h1_eut')
}
sh 'sleep 1s'
script {
// Allow up to 3 retries 5 minutes each for the HIL test
runCommand(3, 5, 'MINUTES', "HackRF One Test", h1_test)
}
script {
allOff()
reset('h1_eut')
}
sh 'sleep 1s'
retry(3) {
sh 'python3 ci-scripts/test_sgpio_debug.py'
}
}
}
stage('Test HackRF Pro with BOARD=PRALINE') {
agent {
docker {
Expand Down Expand Up @@ -99,6 +139,38 @@ pipeline {
}
}
}
stage('Test HackRF Pro with BOARD=UNIVERSAL') {
agent {
docker {
image 'hackrf'
reuseNode true
args "$docker_args"
}
}
options {
timeout(time: 20, unit: 'MINUTES')
}
steps {
sh './ci-scripts/install_host.sh'
sh './ci-scripts/build_firmware.sh UNIVERSAL'
script {
allOff()
reset('hpro_eut')
}
sh 'sleep 1s'
retry(3) {
sh './ci-scripts/test_host.sh'
}
script {
reset('hpro_tester hpro_eut')
}
sh 'sleep 1s'
script {
// Allow up to 3 retries 5 minutes each for the HIL test
runCommand(3, 5, 'MINUTES', "HackRF Pro Test", hpro_test)
}
}
}
}
post {
always {
Expand Down
74 changes: 46 additions & 28 deletions firmware/common/cpld_jtag.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
* Boston, MA 02110-1301, USA.
*/

#if !defined(PRALINE)
#include <stdint.h>
#endif

#include "cpld_jtag.h"
#if !defined(PRALINE)

#include "platform_detect.h"

#ifdef IS_NOT_PRALINE
#include <stdint.h>
#include "xapp058/micro.h"
#endif

#ifndef PRALINE
#ifdef IS_NOT_PRALINE
static refill_buffer_cb refill_buffer;
static uint32_t xsvf_buffer_len, xsvf_pos;
static unsigned char* xsvf_buffer;
Expand All @@ -41,25 +41,37 @@ void cpld_jtag_take(jtag_t* const jtag)
/* Set initial GPIO state to the voltages of the internal or external pull-ups/downs,
* to avoid any glitches.
*/
#if (defined HACKRF_ONE || defined PRALINE)
gpio_set(gpio->gpio_pp_tms);
#ifdef IS_EXPANSION_COMPATIBLE
if (IS_EXPANSION_COMPATIBLE) {
gpio_set(gpio->gpio_pp_tms);
}
#endif

gpio_clear(gpio->gpio_tck);
#ifndef PRALINE
gpio_set(gpio->gpio_tms);
gpio_set(gpio->gpio_tdi);

#ifdef IS_NOT_PRALINE
if (IS_NOT_PRALINE) {
gpio_set(gpio->gpio_tms);
gpio_set(gpio->gpio_tdi);
}
#endif

#if (defined HACKRF_ONE || defined PRALINE)
/* Do not drive PortaPack-specific TMS pin initially, just to be cautious. */
gpio_input(gpio->gpio_pp_tms);
gpio_input(gpio->gpio_pp_tdo);
#ifdef IS_EXPANSION_COMPATIBLE
if (IS_EXPANSION_COMPATIBLE) {
/* Do not drive PortaPack-specific TMS pin initially, just to be cautious. */
gpio_input(gpio->gpio_pp_tms);
gpio_input(gpio->gpio_pp_tdo);
}
#endif

gpio_output(gpio->gpio_tck);
#ifndef PRALINE
gpio_output(gpio->gpio_tms);
gpio_output(gpio->gpio_tdi);
gpio_input(gpio->gpio_tdo);

#ifdef IS_NOT_PRALINE
if (IS_NOT_PRALINE) {
gpio_output(gpio->gpio_tms);
gpio_output(gpio->gpio_tdi);
gpio_input(gpio->gpio_tdo);
}
#endif
}

Expand All @@ -70,20 +82,26 @@ void cpld_jtag_release(jtag_t* const jtag)
/* Make all pins inputs when JTAG interface not active.
* Let the pull-ups/downs do the work.
*/
#if (defined HACKRF_ONE || defined PRALINE)
/* Do not drive PortaPack-specific pins, initially, just to be cautious. */
gpio_input(gpio->gpio_pp_tms);
gpio_input(gpio->gpio_pp_tdo);
#ifdef IS_EXPANSION_COMPATIBLE
if (IS_EXPANSION_COMPATIBLE) {
/* Do not drive PortaPack-specific pins, initially, just to be cautious. */
gpio_input(gpio->gpio_pp_tms);
gpio_input(gpio->gpio_pp_tdo);
}
#endif

gpio_input(gpio->gpio_tck);
#ifndef PRALINE
gpio_input(gpio->gpio_tms);
gpio_input(gpio->gpio_tdi);
gpio_input(gpio->gpio_tdo);

#ifdef IS_NOT_PRALINE
if (IS_NOT_PRALINE) {
gpio_input(gpio->gpio_tms);
gpio_input(gpio->gpio_tdi);
gpio_input(gpio->gpio_tdo);
}
#endif
}

#ifndef PRALINE
#ifdef IS_NOT_PRALINE
/* return 0 if success else return error code see xsvfExecute() */
int cpld_jtag_program(
jtag_t* const jtag,
Expand Down
5 changes: 3 additions & 2 deletions firmware/common/cpld_jtag.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@
#include <stdint.h>

#include "gpio.h"
#include "platform_detect.h"

typedef struct {
gpio_t gpio_tck;
#ifndef PRALINE
#ifdef IS_NOT_PRALINE
gpio_t gpio_tms;
gpio_t gpio_tdi;
gpio_t gpio_tdo;
#endif
#if (defined HACKRF_ONE || defined PRALINE)
#ifdef IS_EXPANSION_COMPATIBLE
gpio_t gpio_pp_tms;
gpio_t gpio_pp_tdo;
#endif
Expand Down
3 changes: 3 additions & 0 deletions firmware/common/firmware_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
#define SUPPORTED_PLATFORM PLATFORM_RAD1O
#elif PRALINE
#define SUPPORTED_PLATFORM PLATFORM_PRALINE
#elif UNIVERSAL
#define SUPPORTED_PLATFORM \
(PLATFORM_PRALINE | PLATFORM_HACKRF1_OG | PLATFORM_HACKRF1_R9)
#else
#define SUPPORTED_PLATFORM 0
#endif
Expand Down
Loading
Loading