Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
6123816
docs: USP port ADRs + flight-radio glossary
Mikefly123 Jul 4, 2026
52264f9
feat(board): add proves_flight_control_board_v5e with USP SX1262 binding
Mikefly123 Jul 4, 2026
986fa02
feat(west+patches): add usp_zephyr + usp west modules + carry patches
Mikefly123 Jul 4, 2026
5c17352
fix(board/v5e): remove nested C comment in DTS board file
Mikefly123 Jul 4, 2026
8782fb4
test(phase2): wire LinkProfiles gtest into pcr unit-test CMakeLists
Mikefly123 Jul 4, 2026
1360ccb
test(phase3): wire ProfilePolicy gtest into pcr unit-test CMakeLists
Mikefly123 Jul 4, 2026
ad10ef6
chore(phase4): bump fprime-zephyr to eef9f4c
Mikefly123 Jul 4, 2026
32a30ba
chore(phase4): bump fprime-zephyr to 2aafb52
Mikefly123 Jul 4, 2026
394d739
feat(phase4): topology integration — UspRadio on v5e, LoRa on v5c/v5d
Mikefly123 Jul 4, 2026
48f0775
feat(phase4): topology integration — v5e uses Zephyr::UspRadio, v5c/v…
Mikefly123 Jul 4, 2026
aa264fd
fix(v5e): guard FlashWorker against CONFIG_IMG_MANAGER=n; add hwil-be…
Mikefly123 Jul 5, 2026
2b3b8f7
chore(phase5): bump fprime-zephyr to f7bf1f7 (RX ConfigurationFailed …
Mikefly123 Jul 5, 2026
871eee4
chore(phase5): bump fprime-zephyr to e7b9e8f (onPostRx/onPostTx three…
Mikefly123 Jul 5, 2026
ee87a00
fix(phase5): carry Zephyr CDC-ACM poll-mode TX drain patch + zephyr-p…
Mikefly123 Jul 5, 2026
682d9b2
fix(phase5): add CDC-ACM 0005 patch — clear BUSY on disable + 10 ms r…
Mikefly123 Jul 5, 2026
edc03f5
chore(phase5): bump fprime-zephyr to 6e36691 (ProfilePolicy revert di…
Mikefly123 Jul 5, 2026
65d96bd
chore(phase5): bump fprime-zephyr to 401d926 (applyGfsk CRC seed/whit…
Mikefly123 Jul 5, 2026
8d40fd9
fix(usp): carry SX126x wakeup-busy race fix as patch 0006
Mikefly123 Jul 11, 2026
ef37630
fix(zephyr): carry bounded cdc_acm_poll_out wait as patch 0007
Mikefly123 Jul 11, 2026
b1e80f9
fix(fsw): FatalHandler hard-reboots after stopping the watchdog
Mikefly123 Jul 11, 2026
eaac48f
chore: bump fprime-zephyr to da7d41e (UART flow control + stopRadio h…
Mikefly123 Jul 11, 2026
fc7bc14
fix(fsw): carry ComAggregator bounded-timeout patch (issue #432) + bu…
Mikefly123 Jul 11, 2026
09b9613
fix(fsw): carry fprime sched-tick drop patch (issue #432 class) + sto…
Mikefly123 Jul 11, 2026
468db15
fix(fsw): extend sched-tick drop patch to PingIn ports (3rd captured …
Mikefly123 Jul 11, 2026
3381f42
chore(debug): add segger module to west allowlist for RTT capture builds
Mikefly123 Jul 11, 2026
f5a0e3b
fix(usp): serialize RAC API calls + exempt UNLOCK from RP failsafe
Mikefly123 Jul 11, 2026
aaff8dc
chore(submodule): bump fprime-zephyr to bdfcb4a (radio fix stack, ben…
Mikefly123 Jul 11, 2026
8078c2a
feat(radio): RX ring + skip-re-arm throughput bundle — submodule bump…
Mikefly123 Jul 11, 2026
071f78a
chore(submodule): bump fprime-zephyr to f1b9265 (skip-re-arm v2)
Mikefly123 Jul 11, 2026
fc0a514
chore(submodule): bump fprime-zephyr to 0046fbc (true TX payload leng…
Mikefly123 Jul 11, 2026
d7102b6
fix(bench): move hwil-bench.conf out of repo root to docs/bench example
Mikefly123 Jul 12, 2026
14a84ae
fix: review-board one-liners — reboot() private, 0008 ISR assert, GFS…
Mikefly123 Jul 12, 2026
ef19015
Merge origin/main into feat/usp-radio
Mikefly123 Jul 12, 2026
a7d0e7d
fix(lint): satisfy make fmt (pre-existing failures, surfaced by CI no…
Mikefly123 Jul 12, 2026
a628591
finalize USP radio operating frequency (437.4 MHz / 10 dBm) + fix inc…
Mikefly123 Jul 12, 2026
11ec659
ci: apply carried usp/zephyr patches before generate/build
Mikefly123 Jul 12, 2026
39bc693
fix(patches): revert whitespace corruption from the earlier lint-fix …
Mikefly123 Jul 12, 2026
976d510
fix(mcuboot): scope out the USP radio stack from the bootloader image
Mikefly123 Jul 12, 2026
d83cd91
fix(test): update integration tests for the USP radio component name
Mikefly123 Jul 12, 2026
c03173b
Merge branch 'main' into feat/usp-radio
Mikefly123 Jul 13, 2026
7839061
feat(radio): bump fprime-zephyr for UspRadio RADIOHEAD_COMPAT shim
Mikefly123 Jul 13, 2026
39e5857
Merge remote-tracking branch 'origin/feat/usp-radio' into feat/usp-radio
Mikefly123 Jul 13, 2026
2cb083c
fix(radio): bump fprime-zephyr for RalSessionImpl -Wreorder fix
Mikefly123 Jul 20, 2026
33424fa
revert(flash): drop CONFIG_IMG_MANAGER=n bench workaround, unrelated …
Mikefly123 Jul 20, 2026
7ce4fda
Merge origin/main into feat/usp-radio (fprime v4.2.2, Zephyr 4.4.1, T…
Mikefly123 Jul 21, 2026
dcd0b61
fix(patches): refresh fprime-sched-tick-drop.patch context for fprime…
Mikefly123 Jul 21, 2026
f46d533
chore(zephyr-patches): drop obsolete 0004 CDC-ACM enable-drain patch
Mikefly123 Jul 21, 2026
c896de2
fix(usp-patches): carry board.yml full_name fix for Zephyr 4.4 schema
Mikefly123 Jul 21, 2026
220d357
chore: bump fprime-zephyr to main-merged feat/usp-radio (fprime v4.2.…
Mikefly123 Jul 21, 2026
2b997f8
fix(boot): shrink mbedTLS static heap 32K->16K to un-starve libc mall…
Mikefly123 Jul 21, 2026
b7931b1
Merge origin/main into feat/usp-radio (mbedTLS 8K heap from #467, fz …
Mikefly123 Jul 23, 2026
71ceaf3
chore(radio): collapse carried patches into OSSF fork integration pin…
Mikefly123 Jul 26, 2026
d704fd3
test(int): RF mode/profile matrix integration tests (HIL rung 6) (#474)
Mikefly123 Jul 27, 2026
c6df588
chore(fprime-zephyr): bump pin to bc3b6b6 (integration branch + GFSK …
Mikefly123 Jul 31, 2026
60eb485
chore(pins): re-pin zephyr + fprime-zephyr onto trimmed integration b…
Mikefly123 Aug 2, 2026
12056fc
Merge main into feat/usp-radio; re-pin fprime-zephyr 9e3bedc
Mikefly123 Aug 3, 2026
1560dce
Trim PR comments and remove dead radio state from the USP port (#518)
Mikefly123 Sep 20, 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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,9 @@ yamcs/yamcs-runtime/
/circuit-python-passthrough/firmware.uf2
/circuit-python-passthrough/lib/
/circuit-python-passthrough/tools/

# Radio config symlinks (generated by CMake at configure time)
PROVESFlightControllerReference/ReferenceDeployment/Top/RadioInstances.fppi
PROVESFlightControllerReference/ReferenceDeployment/Top/RadioTopology.fppi
PROVESFlightControllerReference/ReferenceDeployment/Top/RadioPacketsBytesReceived.fppi
PROVESFlightControllerReference/ReferenceDeployment/Top/RadioPacketsRadio.fppi
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[submodule "lib/fprime"]
path = lib/fprime
url = https://github.com/nasa/fprime.git
url = https://github.com/Open-Source-Space-Foundation/fprime.git
[submodule "lib/zephyr-workspace/zephyr"]
path = lib/zephyr-workspace/zephyr
url = https://github.com/zephyrproject-rtos/zephyr.git
url = https://github.com/Open-Source-Space-Foundation/zephyr.git
Comment on lines +3 to +6

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Synchronize existing submodule checkouts with the new URLs.

Changing .gitmodules does not update URLs already stored in existing clones’ .git/config. Since Makefile:10-13 runs git submodule update without git submodule sync, developers with an existing checkout may continue fetching the old upstream repositories instead of the OSSF forks.

Add git submodule sync --recursive before the update, or explicitly document that migration step.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.gitmodules around lines 3 - 6, Update the Makefile submodule initialization
flow to run git submodule sync --recursive before git submodule update, ensuring
existing checkout configuration uses the URLs from .gitmodules.

[submodule "lib/fprime-zephyr"]
path = lib/fprime-zephyr
url = https://github.com/Open-Source-Space-Foundation/fprime-zephyr.git
Expand Down
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ repos:
rev: v5.0.0
hooks:
- id: trailing-whitespace
# patches/*.patch must byte-match upstream, including trailing
# whitespace, so whitespace hooks must not touch them.
exclude: ^patches/
- id: end-of-file-fixer
exclude: ^patches/
- id: check-yaml
exclude: ^mkdocs\.yml$
- id: check-json
Expand Down
31 changes: 31 additions & 0 deletions CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# CONTEXT: PROVES Flight Radio

Glossary for the flight-software radio domain. Terms here are canonical; use them in code, docs, commands, and telemetry names.

## Radio paths

- **USP Radio Path**: the radio stack built on Semtech's Unified Software Platform (USP). Applies to SX126x-class boards (FCB v5e onward). Multi-modulation capable.
- **Legacy Radio Path**: the existing loramac-node-backed Zephyr `drivers/lora` stack wrapped by the `Zephyr::LoRa` component. Applies to SX127x-class boards (FCB v5/v5c/v5d). LoRa modulation only.
- **USP (Unified Software Platform)**: Semtech's radio software platform (radio drivers + RAL + radio access arbitration + LoRa Basics Modem). `usp_zephyr` is its Zephyr integration module.
- **LBM (LoRa Basics Modem)**: Semtech's modem library bundled inside USP. Its LoRaWAN stack is unused; PROVES flies raw CCSDS point-to-point.
- **RAL (Radio Abstraction Layer)**: USP's chip-agnostic radio API. The seam the flight component talks to, and the seam mocked in unit tests.

## Link configuration

- **Link Profile**: a complete, named radio configuration: modulation plus every parameter needed for two radios to interoperate (e.g. for GFSK: bitrate, deviation, BT, sync word, CRC, preamble). Identified by index into the Profile Table. Profiles are switched atomically; individual RF parameters are never commanded piecemeal in operations.
- **Profile Table**: the versioned, checked-in list of Link Profiles shared verbatim by flight and ground builds. Both ends must be built from the same table version for a profile index to mean the same thing.
- **TX Profile / RX Profile**: the Link Profile currently applied to the transmit and receive directions independently. The link is asymmetric by design (e.g. robust LoRa uplink, high-rate GFSK downlink).
- **Boot-Default Profile**: the profile each direction starts in at boot, and the profile RX Auto-Revert falls back to. Chosen for maximum link robustness, not throughput.
- **RX Auto-Revert**: safety mechanism: after an RX Profile change, if no valid frame is received within the commanded revert window, the RX Profile reverts to the Boot-Default Profile. Receiving a valid frame on the new profile confirms it.

## Modulations

- **CW (Continuous Wave)**: unmodulated carrier transmission for beacons, range testing, and RF debug. A test mode, not a Link Profile.
- **GFSK**: Gaussian FSK packet modulation; the high-throughput downlink option on the USP Radio Path. Capped at 75 kbps, with fdev of 25 kHz, by the Band Constraint.
- **Band Constraint**: IARU coordination limits PROVES UHF emissions to 125 kHz occupied bandwidth or less. Every Link Profile must satisfy it.
- **LR-FHSS**: long-range frequency-hopping modulation. SX126x can transmit but never receive it, so it is out of scope until gateway-grade or LR20xx receive hardware exists in the ground segment.

## Ground segment

- **GRC (Ground Radio Controller)**: the station-local Zephyr radio box (SX1262) that terminates the RF link. Must consume the same Profile Table as flight.
- **RadioHead Header**: the 4-byte `[destination, source, identifier, flags]` prefix the RadioHead LoRa ecosystem (adafruit_rfm9x, legacy `Zephyr::LoRa`) puts on every LoRa packet. The USP Radio Path radiates raw F´ frames; the `RADIOHEAD_COMPAT` parameter on `UspRadio` (default: enabled) prepends/strips this header so USP boards interoperate with RadioHead peers such as the CI CircuitPython passthrough board. Both ends of a link must agree; GFSK profiles are always raw.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ SYSBUILD_PATH ?= $(shell pwd)/lib/zephyr-workspace/zephyr/samples/sysbuild/with_
.PHONY: build-mcuboot
build-mcuboot: submodules zephyr fprime-venv
@cp $(shell pwd)/bootloader/sysbuild.conf $(SYSBUILD_PATH)/sysbuild.conf
@mkdir -p $(SYSBUILD_PATH)/sysbuild
@cp $(shell pwd)/bootloader/sysbuild/mcuboot.conf $(SYSBUILD_PATH)/sysbuild/mcuboot.conf

$(UV_RUN) $(shell pwd)/tools/bin/build-with-proves $(SYSBUILD_PATH) --sysbuild
mv $(shell pwd)/build/with_mcuboot/zephyr/zephyr.uf2 $(shell pwd)/mcuboot.uf2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@

#include <Fw/FPrimeBasicTypes.hpp>
#include <Fw/Logger/Logger.hpp>
#include <Os/Task.hpp>
#include <PROVESFlightControllerReference/Components/FatalHandler/FatalHandler.hpp>

#include <zephyr/sys/reboot.h>

namespace Components {

// ----------------------------------------------------------------------
Expand All @@ -24,9 +27,21 @@ FatalHandler ::FatalHandler(const char* const compName) : FatalHandlerComponentB

FatalHandler ::~FatalHandler() {}

void FatalHandler::reboot() {
sys_reboot(SYS_REBOOT_WARM);

// Only reached if the warm reboot returns.
sys_reboot(SYS_REBOOT_COLD);
}

void FatalHandler::FatalReceive_handler(const FwIndexType portNum, FwEventIdType Id) {
Fw::Logger::log("FATAL %" PRI_FwEventIdType " handled.\n", Id);
// Stop petting the external watchdog.
this->stopWatchdog_out(0);
// Short delay so the FATAL log can drain, then force a reboot so the reset
// does not depend on the external watchdog.
Os::Task::delay(Fw::TimeInterval(0, 1000)); // 1 ms
this->reboot();
}

} // namespace Components
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class FatalHandler final : public FatalHandlerComponentBase {
void FatalReceive_handler(const FwIndexType portNum, /*!< The port number*/
FwEventIdType Id /*!< The ID of the FATAL event*/
);

//! Reboot the device via Zephyr sys_reboot()
void reboot();
};

} // namespace Components
Expand Down
5 changes: 5 additions & 0 deletions PROVESFlightControllerReference/ReferenceDeployment/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
const struct device* ina219Sys = DEVICE_DT_GET(DT_NODELABEL(ina219_0));
const struct device* ina219Sol = DEVICE_DT_GET(DT_NODELABEL(ina219_1));
const struct device* serial = DEVICE_DT_GET(DT_NODELABEL(cdc_acm_uart0));
// The USP build (v5e) has no Zephyr lora device node; the radio is opened by RalSessionImpl.
#ifndef CONFIG_LORA_BASICS_MODEM_DRIVERS
const struct device* lora = DEVICE_DT_GET(DT_NODELABEL(lora0));
#endif
// const struct device* spi0 = DEVICE_DT_GET(DT_NODELABEL(spi0));
const struct device* peripheral_uart = DEVICE_DT_GET(DT_NODELABEL(uart0));
const struct device* peripheral_uart1 = DEVICE_DT_GET(DT_NODELABEL(uart1));
Expand Down Expand Up @@ -76,7 +79,9 @@ int main(int argc, char* argv[]) {
// Flight Control Board device bindings
inputs.ina219SysDevice = ina219Sys;
inputs.ina219SolDevice = ina219Sol;
#ifndef CONFIG_LORA_BASICS_MODEM_DRIVERS
inputs.loraDevice = lora;
#endif
Comment thread
coderabbitai[bot] marked this conversation as resolved.
inputs.uartDevice = serial;
inputs.lsm6dsoDevice = lsm6dso;
inputs.lis2mdlDevice = lis2mdl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,33 @@
# AUTOCODER_INPUTS: list of files to be passed to the autocoders
# DEPENDS: list of libraries that this module depends on
#
# More information in the F´ CMake API documentation:
# https://fprime.jpl.nasa.gov/latest/docs/reference/api/cmake/API/
#
# Per-board radio selection:
# CONFIG_LORA_BASICS_MODEM_DRIVERS set (v5e): Radio*.fppi -> Radio*_Usp.fppi (Zephyr::UspRadio)
# CONFIG_LORA_BASICS_MODEM_DRIVERS unset (v5c/v5d): Radio*.fppi -> Radio*_Lora.fppi (Zephyr::LoRa)
# FPP `include` resolves relative to the including file, so the links are
# created in the source tree at configure time. COPY_ON_ERROR falls back to a
# file copy where symlinks are not supported. The links are gitignored.
####

if(DEFINED CONFIG_LORA_BASICS_MODEM_DRIVERS)
set(RADIO_SUFFIX "Usp")
else()
set(RADIO_SUFFIX "Lora")
endif()
Comment on lines +16 to +20

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '--- PROVESFlightControllerReference/ReferenceDeployment/Top/CMakeLists.txt ---\n'
cat -n PROVESFlightControllerReference/ReferenceDeployment/Top/CMakeLists.txt

printf '\n--- Search for CONFIG_LORA_BASICS_MODEM_DRIVERS and related guards ---\n'
rg -n "CONFIG_LORA_BASICS_MODEM_DRIVERS|if\\(DEFINED CONFIG_|if\\(CONFIG_" PROVESFlightControllerReference -g 'CMakeLists.txt' -g '*.cmake' -g '*.txt' -g '*.hpp' -g '*.cpp'

printf '\n--- Nearby CMake/Kconfig integration files ---\n'
git ls-files 'PROVESFlightControllerReference/**/Kconfig*' 'PROVESFlightControllerReference/**/prj.conf' 'PROVESFlightControllerReference/**/overlay*.conf' 'PROVESFlightControllerReference/**/CMakeLists.txt'

Repository: Open-Source-Space-Foundation/proves-core-reference

Length of output: 279


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- PROVESFlightControllerReference/ReferenceDeployment/Top/CMakeLists.txt ---'
cat -n PROVESFlightControllerReference/ReferenceDeployment/Top/CMakeLists.txt

echo
echo '--- Search for CONFIG_LORA_BASICS_MODEM_DRIVERS and related guards ---'
rg -n "CONFIG_LORA_BASICS_MODEM_DRIVERS|if\\(DEFINED CONFIG_|if\\(CONFIG_" PROVESFlightControllerReference -g 'CMakeLists.txt' -g '*.cmake' -g '*.txt' -g '*.hpp' -g '*.cpp'

echo
echo '--- Nearby CMake/Kconfig integration files ---'
git ls-files 'PROVESFlightControllerReference/**/Kconfig*' 'PROVESFlightControllerReference/**/prj.conf' 'PROVESFlightControllerReference/**/overlay*.conf' 'PROVESFlightControllerReference/**/CMakeLists.txt'

Repository: Open-Source-Space-Foundation/proves-core-reference

Length of output: 7341


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- PROVESFlightControllerReference/project/config/CMakeLists.txt ---'
cat -n PROVESFlightControllerReference/project/config/CMakeLists.txt

echo
echo '--- PROVESFlightControllerReference/ReferenceDeployment/CMakeLists.txt ---'
cat -n PROVESFlightControllerReference/ReferenceDeployment/CMakeLists.txt

echo
echo '--- PROVESFlightControllerReference/ReferenceDeployment/Main.cpp ---'
sed -n '1,140p' PROVESFlightControllerReference/ReferenceDeployment/Main.cpp

echo
echo '--- PROVESFlightControllerReference/ReferenceDeployment/Top/ReferenceDeploymentTopology.cpp ---'
sed -n '1,220p' PROVESFlightControllerReference/ReferenceDeployment/Top/ReferenceDeploymentTopology.cpp

Repository: Open-Source-Space-Foundation/proves-core-reference

Length of output: 22403


🌐 Web query:

CMake if(CONFIG_VAR) truthiness false values n empty undefined Zephyr CONFIG_ Kconfig CMake variable set to n

💡 Result:

In CMake, the if command evaluates variables based on specific truthiness rules [1][2]. When you use if(CONFIG_VAR), CMake checks the value of the variable named CONFIG_VAR [1][2]. The following values are considered false in CMake [1][2]: - The constants: 0, OFF, NO, FALSE, N, IGNORE, NOTFOUND [1][2]. - The empty string "" [1][2]. - Any value ending in the suffix -NOTFOUND [1][2]. - Undefined variables are also considered false [3][1][2]. If a variable is defined to any other value, it is considered true [3][1][2]. Regarding Zephyr and Kconfig: When Zephyr processes Kconfig symbols, symbols set to n are typically treated in a way that aligns with these CMake rules [4]. Specifically, Kconfig boolean symbols set to n correspond to unset variables or variables explicitly set to n in the resulting configuration output used by CMake [4]. Because CMake treats both undefined variables and the constant n as false, if(CONFIG_VAR) will correctly evaluate to false for symbols that are disabled (n) or unset [1][4][2]. If you are dealing with a scenario where you expect a symbol to be false but it is evaluating to true, ensure the variable is not being set to a non-false string (e.g., a literal "n" that is being treated as a string or a value like "0" that might have been converted) and verify the definition state of the variable within your CMake scope [1][5][2].

Citations:


Use a value check for CONFIG_LORA_BASICS_MODEM_DRIVERS Prefer if(CONFIG_LORA_BASICS_MODEM_DRIVERS) here; DEFINED only tests presence, so it can select RADIO_SUFFIX "Usp" when the symbol is disabled as n.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@PROVESFlightControllerReference/ReferenceDeployment/Top/CMakeLists.txt`
around lines 24 - 28, Update the condition selecting RADIO_SUFFIX in the
CMakeLists logic to use the boolean value of CONFIG_LORA_BASICS_MODEM_DRIVERS
rather than checking only whether it is defined. Preserve "Usp" for enabled
values and select "Lora" when the option is disabled or unset.


# Instance and topology snippets.
foreach(_kind "Instances" "Topology")
set(_src "${CMAKE_CURRENT_LIST_DIR}/Radio${_kind}_${RADIO_SUFFIX}.fppi")
set(_dst "${CMAKE_CURRENT_LIST_DIR}/Radio${_kind}.fppi")
file(CREATE_LINK "${_src}" "${_dst}" SYMBOLIC COPY_ON_ERROR)
endforeach()
# Packet snippets (they reference the per-board instance names).
foreach(_kind "BytesReceived" "Radio")
set(_src "${CMAKE_CURRENT_LIST_DIR}/RadioPackets${_kind}_${RADIO_SUFFIX}.fppi")
set(_dst "${CMAKE_CURRENT_LIST_DIR}/RadioPackets${_kind}.fppi")
file(CREATE_LINK "${_src}" "${_dst}" SYMBOLIC COPY_ON_ERROR)
endforeach()

register_fprime_module(
AUTOCODER_INPUTS
"${CMAKE_CURRENT_LIST_DIR}/instances.fpp"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Radio instances for v5c / v5d (Zephyr LoRa driver).
# Included by instances.fpp inside module ReferenceDeployment { }.
# Selected by Top/CMakeLists.txt per board.

instance lora: Zephyr.LoRa base id 0x1001F000

instance loraRetry: Svc.ComRetry base id 0x10063000
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Radio instances for v5e (Semtech USP driver).
# Included by instances.fpp inside module ReferenceDeployment { }.
# Selected by Top/CMakeLists.txt per board.
#
# UspRadio is an active component. Priority 11 is above the rate groups.

instance uspRadio: Zephyr.UspRadio base id 0x1001F000 \
queue size Default.QUEUE_SIZE * 2 \
stack size Default.STACK_SIZE \
priority 11
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lora.BytesReceived
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uspRadio.BytesReceived
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
packet Radio id 8 group 2 {
lora.LastRssi
lora.LastSnr
lora.BytesSent
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
packet Radio id 8 group 2 {
uspRadio.LastRssi
uspRadio.LastSnr
uspRadio.BytesSent
uspRadio.TxProfile
uspRadio.RxProfile
uspRadio.RxReverts
uspRadio.RxDropped
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Radio connections for v5c / v5d (Zephyr LoRa driver).
# Included by topology.fpp inside topology ReferenceDeployment { }.
# Selected by Top/CMakeLists.txt per board.

instance lora
instance loraRetry

connections CommunicationsRadio {
lora.allocate -> ComCcsdsLora.commsBufferManager.bufferGetCallee
lora.deallocate -> ComCcsdsLora.commsBufferManager.bufferSendIn

# ComDriver <-> FrameAccumulator (Uplink)
lora.dataOut -> ComCcsdsLora.frameAccumulator.dataIn
ComCcsdsLora.frameAccumulator.dataReturnOut -> lora.dataReturnIn

# ComStub <-> ComDriver (Downlink) with ComRetry shim
ComCcsdsLora.framer.dataOut -> loraRetry.dataIn
loraRetry.dataOut -> lora.dataIn

lora.dataReturnOut -> loraRetry.dataReturnIn
loraRetry.dataReturnOut -> ComCcsdsLora.framer.dataReturnIn

lora.comStatusOut -> loraRetry.comStatusIn
loraRetry.comStatusOut -> downlinkDelay.comStatusIn
downlinkDelay.comStatusOut -> ComCcsdsLora.framer.comStatusIn

# Startup and sequence wiring (same in RadioTopology_Usp.fppi)
startupManager.runSequence -> cmdSeq.seqRunIn

# StartupManager receives sequence status from CmdSeq
cmdSeq.seqStartOut -> startupManager.startupsequenceStarted
cmdSeq.seqDone -> startupManager.startupCompleteSequence

# StartupManager receives sequence status from PayloadSeq
payloadSeq.seqStartOut -> startupManager.payloadSequenceStarted
payloadSeq.seqDone -> startupManager.payloadCompleteSequence

# StartupManager receives sequence status from SafeModeSeq
# seqDone is owned by ModeManager; completion is forwarded via sequenceDoneNotify
safeModeSeq.seqStartOut -> startupManager.safeModeSequenceStarted

# StartupManager drives radio TX enable/disable around quiescence
startupManager.enableTransmit -> lora.enableTransmit
startupManager.disableTransmit -> lora.disableTransmit

# --- Radio ever enabled this boot? ---
lora.loraFirstStart -> startupManager.loraFirstStart

modeManager.runSequence -> safeModeSeq.seqRunIn
safeModeSeq.seqDone -> modeManager.completeSequence
modeManager.sequenceDoneNotify -> startupManager.safeModeCompleteSequence

# RTC time change cancels running sequences
rtcManager.cancelSequences[0] -> cmdSeq.seqCancelIn
rtcManager.cancelSequences[1] -> payloadSeq.seqCancelIn
rtcManager.cancelSequences[2] -> safeModeSeq.seqCancelIn
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Radio connections for v5e (Semtech USP driver).
# Included by topology.fpp inside topology ReferenceDeployment { }.
# Selected by Top/CMakeLists.txt per board.
#
# UspRadio is active, so its queue provides back-pressure and no ComRetry shim is needed.

instance uspRadio

connections CommunicationsRadio {
uspRadio.allocate -> ComCcsdsLora.commsBufferManager.bufferGetCallee
uspRadio.deallocate -> ComCcsdsLora.commsBufferManager.bufferSendIn

# UspRadio <-> FrameAccumulator (Uplink)
uspRadio.dataOut -> ComCcsdsLora.frameAccumulator.dataIn
ComCcsdsLora.frameAccumulator.dataReturnOut -> uspRadio.dataReturnIn

# UspRadio <-> Framer (Downlink)
ComCcsdsLora.framer.dataOut -> uspRadio.dataIn
uspRadio.dataReturnOut -> ComCcsdsLora.framer.dataReturnIn
uspRadio.comStatusOut -> downlinkDelay.comStatusIn
downlinkDelay.comStatusOut -> ComCcsdsLora.framer.comStatusIn

# Startup and sequence wiring (same in RadioTopology_Lora.fppi)
startupManager.runSequence -> cmdSeq.seqRunIn

# StartupManager receives sequence status from CmdSeq
cmdSeq.seqStartOut -> startupManager.startupsequenceStarted
cmdSeq.seqDone -> startupManager.startupCompleteSequence

# StartupManager receives sequence status from PayloadSeq
payloadSeq.seqStartOut -> startupManager.payloadSequenceStarted
payloadSeq.seqDone -> startupManager.payloadCompleteSequence

# StartupManager receives sequence status from SafeModeSeq
# seqDone is owned by ModeManager; completion is forwarded via sequenceDoneNotify
safeModeSeq.seqStartOut -> startupManager.safeModeSequenceStarted

# StartupManager drives radio TX enable/disable around quiescence
startupManager.enableTransmit -> uspRadio.enableTransmit
startupManager.disableTransmit -> uspRadio.disableTransmit

# Both ports are Fw.Signal, so the names may differ.
uspRadio.radioFirstStart -> startupManager.loraFirstStart

modeManager.runSequence -> safeModeSeq.seqRunIn
safeModeSeq.seqDone -> modeManager.completeSequence
modeManager.sequenceDoneNotify -> startupManager.safeModeCompleteSequence

# RTC time change cancels running sequences
rtcManager.cancelSequences[0] -> cmdSeq.seqCancelIn
rtcManager.cancelSequences[1] -> payloadSeq.seqCancelIn
rtcManager.cancelSequences[2] -> safeModeSeq.seqCancelIn
}


connections RadioRateGroup {
# 1 Hz tick for the revert deadline and telemetry flush. Slot 20 is the first unused rate-group slot.
rateGroup1Hz.RateGroupMemberOut[20] -> uspRadio.run
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ telemetry packets ReferenceDeploymentPackets {
ComCcsdsLora.tcSecurityDeframer.CurrentSequenceNumber
ComCcsdsUart.tcSecurityDeframer.CurrentSequenceNumber

lora.BytesReceived
# Radio bytes received: per-board instance name.
# Radio BytesReceived channel. Selected by Top/CMakeLists.txt per board.
include "RadioPacketsBytesReceived.fppi"

}

Expand All @@ -45,13 +47,8 @@ telemetry packets ReferenceDeploymentPackets {
imuManager.MagnetometerSamplingFrequency
}

packet Radio id 8 group 2 {
lora.LastRssi
lora.LastSnr
lora.BytesSent
# sband.LastRssi
# sband.LastSnr
}
# Radio packet. Selected by Top/CMakeLists.txt per board.
include "RadioPacketsRadio.fppi"

packet PowerMonitor id 11 group 2 {
ina219SysManager.Current
Expand Down
Loading