diff --git a/README.md b/README.md index 093e5fa..f5be879 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Python-based ECU testing framework built on pytest, with a pluggable LIN communi - Mock LIN adapter for fast, hardware-free development - Real BabyLIN adapter using the SDK's official Python wrapper (BabyLIN_library.py) -- Hex flashing scaffold you can wire to UDS/XCP +- Hex flashing scaffold you can wire to UDS - Rich pytest fixtures and example tests - Self-contained HTML report with Title, Requirements, Steps, and Expected Results extracted from test docstrings - JUnit XML report for CI/CD @@ -206,5 +206,5 @@ The `ecu_framework/lin/babylin.py` implementation uses the official `BabyLIN_lib ## Next steps - Plug in the actual BabyLin DLL and verify the hardware smoke tests -- Replace `HexFlasher` with a production flashing routine (UDS/XCP) +- Replace `HexFlasher` with a production flashing routine (UDS) - Expand tests for end-to-end ECU workflows and requirement coverage diff --git a/docs/07_flash_sequence.md b/docs/07_flash_sequence.md index a3cee34..c037fdb 100644 --- a/docs/07_flash_sequence.md +++ b/docs/07_flash_sequence.md @@ -1,6 +1,6 @@ # Flashing Sequence (ECU Programming) -This document outlines the expected flashing workflow using the `HexFlasher` scaffold over the LIN interface and where you can plug in your production flasher (UDS/XCP). +This document outlines the expected flashing workflow using the `HexFlasher` scaffold over the LIN interface and where you can plug in your production flasher (UDS). ## Overview @@ -23,7 +23,7 @@ sequenceDiagram alt flash.enabled == true and hex_path provided F->>H: HexFlasher(lin).flash_hex(hex_path) H->>L: connect (ensure session ready) - H->>E: Enter programming session (UDS/XCP) + H->>E: Enter programming session (UDS) H->>E: Erase memory (as required) loop For each block in HEX H->>L: Transfer block via LIN frames @@ -39,7 +39,7 @@ sequenceDiagram ## Implementation notes -- `ecu_framework/flashing/hex_flasher.py` is a stub — replace with your protocol implementation (UDS/XCP) +- `ecu_framework/flashing/hex_flasher.py` is a stub — replace with your protocol implementation (UDS) - Validate timing requirements and chunk sizes per ECU - Consider power-cycle/reset hooks via programmable poewr supply. diff --git a/ecu_framework/flashing/__init__.py b/ecu_framework/flashing/__init__.py index ac037b1..e1e18f2 100644 --- a/ecu_framework/flashing/__init__.py +++ b/ecu_framework/flashing/__init__.py @@ -1,3 +1,9 @@ +""" +Flashing package. + +Exports: +- HexFlasher: scaffold class to wire up UDS-based ECU programming over LIN. +""" from .hex_flasher import HexFlasher __all__ = ["HexFlasher"] diff --git a/ecu_framework/flashing/hex_flasher.py b/ecu_framework/flashing/hex_flasher.py index 6ba1682..f479841 100644 --- a/ecu_framework/flashing/hex_flasher.py +++ b/ecu_framework/flashing/hex_flasher.py @@ -9,7 +9,7 @@ from ..lin.base import LinInterface class HexFlasher: """Stubbed ECU flasher over LIN. - Replace with your actual UDS/XCP flashing sequence. For now, just validates the file exists + Replace with your actual UDS flashing sequence. For now, just validates the file exists and pretends to flash successfully. """ @@ -20,6 +20,6 @@ class HexFlasher: path = pathlib.Path(hex_path) if not path.is_file(): raise FileNotFoundError(f"HEX file not found: {hex_path}") - # TODO: Implement real flashing over LIN (UDS/XCP). This is a placeholder. + # TODO: Implement real flashing over LIN (UDS). This is a placeholder. # You might send specific frames or use a higher-level protocol library. return True