ECUA UART: add alternative CDC-USB / LPUART1 - #73
Open
BenGardiner wants to merge 12 commits into
Open
BenGardiner wants to merge 12 commits into
BenGardiner wants to merge 12 commits into
Conversation
… fallback definitions
* Plan for skipping J1939db dependent tests in CI Co-authored-by: BenGardiner <243321+BenGardiner@users.noreply.github.com> * Dynamically skip J1939db tests in RecordingDescriber if file is missing Co-authored-by: BenGardiner <243321+BenGardiner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BenGardiner <243321+BenGardiner@users.noreply.github.com>
Contributor
🔨 Build & Macro Coverage ReportDefault Builds — Hex File Sizes
Macro Coverage Build Results
Source Code Compile Coverage
Full ENABLE_ Macro Coverage Table
|
BenGardiner
force-pushed
the
ecua-alt-transport
branch
from
September 20, 2026 14:36
cd5b003 to
de7fe9a
Compare
… LPUART1 backend - Add RAMN_SERIAL_CMD_TRANSPORT_USB_CDC / RAMN_SERIAL_CMD_TRANSPORT_LPUART1 macros with compile-time XOR enforcement in ramn_config.h - Create ramn_serial_cmd.h/.c: transport-agnostic send API with backend function table registration - Refactor ramn_cdc.c to use RAMN_Serial_Send* instead of RAMN_USB_Send* - Extend ramn_cdc.h/.c and ramn_dbc.c guards to compile for both CDC and UART transports - Add UART lock/ASCII send functions to ramn_uart.h/.c for LPUART1 backend - Update main.c: register serial backends, route LPUART1 commands through CLI/sLCAN processors, and guard CDC headers and structs for UART builds - Guard ENABLE_USB_DEBUG to USB transport only Co-authored-by: BenGardiner <243321+BenGardiner@users.noreply.github.com>
…T1 transport - In RAMN_SendCANFunc, guard slcan frame forwarding with #if defined(ENABLE_CDC) || defined(ENABLE_UART) - Replace RAMN_USB_SendFromTask with RAMN_Serial_SendFromTask so frames transmitted by ECU A itself are forwarded over whichever serial backend is active (USB CDC or LPUART1) - Update comment in RAMN_ReceiveCANFunc noting USB/UART echo storm prevention
…guide - Add ecua_lpuart1_transport build variant to CI matrix - Document ECUA command transport selection (USB CDC XOR LPUART1) in customizing_guide.rst - Mention selectable serial command transports in README.md Co-authored-by: BenGardiner <243321+BenGardiner@users.noreply.github.com>
BenGardiner
force-pushed
the
ecua-alt-transport
branch
from
September 20, 2026 14:56
de7fe9a to
54ff2ea
Compare
Contributor
Author
|
@CamilleTTT this PR is a culmination of #70 , #71 , #72 (and #73 itself). If you like the whole set you can just merge this one. Or if there are larger changes to be made in one you can pick and choose. |
Contributor
Author
|
(also added docker run of the firmwares in a renode container and python-can runtime testing via slcan socket:// for any LPUART builds in the matrix) |
BenGardiner
force-pushed
the
ecua-alt-transport
branch
from
September 20, 2026 16:51
b1a2b69 to
8a4ad4f
Compare
BenGardiner
force-pushed
the
ecua-alt-transport
branch
from
September 20, 2026 17:12
8a4ad4f to
05913c7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
enables ECU A to use LPUART1 as an alternative command transport (e.g. for Renode simulation or hardware UART adapters) and connects it with
ENABLE_ECUA_HOST_INTERACTION(see #72) so that internal CAN transmissions are forwarded over the active serial transport.Testing included simulating 4-ECU RAMN in Re:node and connecting python-can to the set over LPUART1 over TCP (python-can slcan 'socket://') in J1939 mode
ECUA,ECUB,ECUC,ECUD) attached tocanHubwithECUA.lpuart1exposed via TCP socket port29536.python-canSLCAN client (socket://127.0.0.1:29536):0x18EAFFF1) was sent from client0xF1.0x13Chassis,0x21Powertrain,0x5ABody) responded and were forwarded.0x2AHeadway) claimed its address and its transmitted frame was forwarded to the host over LPUART1