STM32F407-based device that bridges a repeater radio's audio + control (COR/PTT,
CTCSS/DCS) to an AllStarLink node over Ethernet
using the USRP UDP protocol (chan_usrp). It replaces the traditional
Raspberry Pi + USB sound-card setup with a single purpose-built board.
Full hardware design rationale lives in
ethernet-radio-bridge-design.md. This repository is the firmware + web UI.
src/
proto/ USRP wire codec (portable, byte-accurate, host-tested)
dsp/ ringbuf, biquad, goertzel(CTCSS decode), dds(CTCSS encode),
golay23 + dcs, jitter_buffer (drop/insert for clock drift)
config/ versioned binary config struct, crc32, A/B flash store, JSON-for-web
sys/ leveled logging, assert, timebase/RTC iface, watchdog supervisor
bsp/ board init / pins / clocks (nucleo_f429zi | board_f407) [target]
hal_glue/ thin HAL wrappers: adc_dma, dac_dma, gpio_io, spi_flash, ... [target]
net/ lwIP glue, usrp_engine, httpd + Basic auth, sntp, mdns [target]
app/ FreeRTOS tasks (audio/network/web/env) + supervisor + main [target]
tests/ Unity host unit tests for every portable module
web/ configuration UI (vanilla HTML/CSS/JS, gzip-packed into flash)
tools/ fetch_deps.sh, webfs_pack.py, usrp_sim.py
linker/ memory maps (CCM-aware, bootloader + A/B app banks)
docs/ architecture, memory map, pinmap, verified USRP protocol notes
cmake/ arm-none-eabi toolchain + firmware dependency locator
proto/, dsp/, config/ and the portable parts of sys/ compile on the
host and are covered by unit tests. Everything under bsp/, hal_glue/,
net/, app/ is target-only (needs STM32 HAL / FreeRTOS / lwIP).
No embedded toolchain required; just a host C compiler, CMake and Python 3.
git submodule update --init third_party/unity # one-time (Unity test framework)
./scripts/run_tests.sh # configure + build + ctestor manually:
cmake --preset host
cmake --build --preset host
ctest --preset host./tools/fetch_deps.sh # pull STM32 HAL/CMSIS, FreeRTOS, lwIP
cmake --preset firmware-f429zi # or firmware-f407
cmake --build --preset firmware-f429zi
# -> build/f429zi/firmware.elf (+ .bin/.hex)The ARM toolchain (
arm-none-eabi-gcc) and the middleware are intentionally not required for the host test build, so CI and contributors can validate the DSP/protocol/config logic without any hardware or vendor SDK.
python3 tools/webfs_pack.py web/ build/webfs.img --cheader src/net/webfs_data.hScaffold stage. The portable core (USRP codec, CTCSS/DCS DSP, jitter buffer,
config store) is implemented and unit-tested. The target layers (bsp/,
hal_glue/, net/, app/) are interface-complete stubs ready to be filled in
on real hardware — see docs/architecture.md and the TODO(hw): markers.
TBD. Intended: MIT for this firmware. Third-party components retain their own
licenses — see THIRD_PARTY_LICENSES.md.