Skip to content

enable full ECUA interaction from the PC host by using source tags and switching matrix - #72

Open
BenGardiner wants to merge 8 commits into
ToyotaInfoTech:mainfrom
BenGardiner:ecua-host-interaction
Open

BenGardiner wants to merge 8 commits into
ToyotaInfoTech:mainfrom
BenGardiner:ecua-host-interaction

Conversation

@BenGardiner

Copy link
Copy Markdown
Contributor

the previous PROCESS_SLCAN_BY_DBC was limited to only DBC stuff. Being able to get to e.g. ECUA UDS stack is an important thing for wider challenges on RAMN.

Getting this right is important of course. I have tested the attached to confirm that the firmware update scripts still work and scapy can still do UDS stuff directly to ECUA using slcan. And also doing J1939 and UDS to ECUA from the host.

The newly implemented ENABLE_ECUA_HOST_INTERACTION:

• Injects incoming host frames directly into ramn_canfd.c:568-607 tagged with RAMN_CAN_ORIGIN_HOST.
• Allows main.c:1675-1729 to dispatch host frames to all internal stacks: DBC (screen still updates), UDS
diagnostics, J1939, KWP, and XCP.
• Supports both slcan and gs_usb.
• Provides bidirectional communication by capturing internal ECU A transmissions and forwarding them to the PC
without echoing host frames back to USB.

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🔨 Build & Macro Coverage Report

Default Builds — Hex File Sizes

ECU Debug (tag 15.0) Debug (tag 2.1.1) Release (tag 15.0) Release (tag 2.1.1)
ECUA 546 KiB (559467 bytes) 546 KiB (559422 bytes) 369 KiB (377883 bytes) 368 KiB (377777 bytes)
ECUB 363 KiB (372451 bytes) 363 KiB (372451 bytes) 216 KiB (222166 bytes) 216 KiB (221671 bytes)
ECUC 345 KiB (353325 bytes) 345 KiB (353325 bytes) 196 KiB (201593 bytes) 196 KiB (201082 bytes)
ECUD 354 KiB (363053 bytes) 354 KiB (363053 bytes) 204 KiB (209063 bytes) 203 KiB (208748 bytes)

Macro Coverage Build Results

Variant Macros Changed Result Warnings
gsusb +ENABLE_GSUSB ✅ Pass 5
gsusb_and_bb +ENABLE_GSUSB +ENABLE_BITBANG ✅ Pass 5
i2c +ENABLE_I2C ✅ Pass 5
j1939 +DEFAULT_TRAFFIC_MODE=TRAFFIC_MODE_J1939 ✅ Pass 5
j1939_showcase_mode +DEFAULT_TRAFFIC_MODE=TRAFFIC_MODE_J1939 +RAMN_SHOWCASE_MODE ✅ Pass 5
kwp +ENABLE_KWP ✅ Pass 5
no_debug −ENABLE_USB_DEBUG −ENABLE_JOYSTICK_CONTROLS −ENABLE_SCREEN −ENABLE_CHIP8 −GENERATE_RUNTIME_STATS ✅ Pass 5
no_dynamic_bitrate −ENABLE_DYNAMIC_BITRATE ✅ Pass 5
no_extras −ENABLE_J1979 −ENABLE_MINICTF −ENABLE_CHIP8 −ENABLE_SCREEN −ENABLE_SPI ✅ Pass 5
no_uds −ENABLE_UDS −ENABLE_UDS_REPROGRAMMING ✅ Pass 6
uart +ENABLE_UART −ENABLE_CDC −ENABLE_USB ✅ Pass 5
usb_autodetect +ENABLE_USB_AUTODETECT ✅ Pass 5
watchdog +WATCHDOG_ENABLE ✅ Pass 5

Source Code Compile Coverage

  • Total .c source lines: 21917
  • Lines compiled in ≥1 configuration: 20767 (~95%)
  • ENABLE_ macro coverage: 23/23 (100.0%) macros tested in both ON and OFF states
Full ENABLE_ Macro Coverage Table
# Macro Tested ON Tested OFF Covered
1 ENABLE_ADC default (ECUB, ECUC, ECUD) default (ECUA) ✅
2 ENABLE_BITBANG default (ECUA), variant: gsusb_and_bb default (ECUB, ECUC, ECUD) ✅
3 ENABLE_CDC default (ECUA) default (ECUB, ECUC, ECUD), variant: uart ✅
4 ENABLE_CHIP8 default (ECUA) default (ECUB, ECUC, ECUD), variant: no_debug, variant: no_extras ✅
5 ENABLE_DYNAMIC_BITRATE default (ECUA, ECUB, ECUC, ECUD) variant: no_dynamic_bitrate ✅
6 ENABLE_ECUA_HOST_INTERACTION default (ECUA) default (ECUB, ECUC, ECUD) ✅
7 ENABLE_GSUSB variant: gsusb, variant: gsusb_and_bb default (ECUA, ECUB, ECUC, ECUD) ✅
8 ENABLE_I2C variant: i2c default (ECUA, ECUB, ECUC, ECUD) ✅
9 ENABLE_J1979 default (ECUA, ECUB, ECUC, ECUD) variant: no_extras ✅
10 ENABLE_JOYSTICK_CONTROLS default (ECUA) default (ECUB, ECUC, ECUD), variant: no_debug ✅
11 ENABLE_KWP variant: kwp default (ECUA, ECUB, ECUC, ECUD) ✅
12 ENABLE_MINICTF default (ECUA, ECUD) default (ECUB, ECUC), variant: no_extras ✅
13 ENABLE_SCREEN default (ECUA) default (ECUB, ECUC, ECUD), variant: no_debug, variant: no_extras ✅
14 ENABLE_SPI default (ECUA, ECUD) default (ECUB, ECUC), variant: no_extras ✅
15 ENABLE_UART variant: uart default (ECUA, ECUB, ECUC, ECUD) ✅
16 ENABLE_UDS default (ECUA, ECUB, ECUC, ECUD) variant: no_uds ✅
17 ENABLE_UDS_REPROGRAMMING default (ECUA, ECUB, ECUC, ECUD) variant: no_uds ✅
18 ENABLE_USB default (ECUA) default (ECUB, ECUC, ECUD), variant: uart ✅
19 ENABLE_USB_AUTODETECT variant: usb_autodetect default (ECUA, ECUB, ECUC, ECUD) ✅
20 ENABLE_USB_DEBUG default (ECUA) default (ECUB, ECUC, ECUD), variant: no_debug ✅
21 ENABLE_XCP default (ECUB, ECUC, ECUD) default (ECUA) ✅
22 GENERATE_RUNTIME_STATS default (ECUA, ECUB, ECUC, ECUD) variant: no_debug ✅
23 WATCHDOG_ENABLE variant: watchdog default (ECUA, ECUB, ECUC, ECUD) ✅

Copilot AI and others added 3 commits September 17, 2026 12:38
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants