@anik-2/autosar 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,29 @@
1
+ # Project layout (typical OEM / Tier-1 integration repo)
2
+
3
+ | Folder | Holds | Who edits |
4
+ |---|---|---|
5
+ | `Config/` | ECUC values ARXML (one or more files per module), configurator project file | integrator, via the configurator or `ecuc_edit` |
6
+ | `Input/` | System description / ECU extract, DBC/LDF/FIBEX, SWC descriptions, diagnostic data | comes from the OEM network/system team |
7
+ | `Output/` | generated BSW/RTE/OS/MCAL configuration code and reports | generator only — never by hand |
8
+ | `Source/` | in-house application and integration code (callouts, CDDs, SWC runnables) | developers |
9
+ | `Build/` | makefiles/CMake, linker scripts, compiler options | build owner |
10
+ | `SIP/` (or `BSW/`, `ThirdParty/`) | the vendor's Software Integration Package: static BSW code, BSWMD with vendor param defs (VSMD), generators | vendor; read-only |
11
+
12
+ Names vary; the tools classify `.arxml` files by content, not by folder.
13
+
14
+ ## `.hydron/autosar.json`
15
+ Optional; pins what the tools load and how to generate/build:
16
+
17
+ ```json
18
+ {
19
+ "paramDefs": ["SIP/**/bswmd/*.arxml", "~/autosar/R22-11/AUTOSAR_MOD_ECUConfigurationParameters.arxml"],
20
+ "config": ["Config/**/*.arxml"],
21
+ "input": ["Input/**/*.arxml"],
22
+ "generate": {"command": "<vendor-cli> -p Config/Ecu.dpa --generate {module}", "cwd": ".", "timeoutSec": 3600},
23
+ "build": {"command": "make -C Build -j8 all", "timeoutSec": 3600}
24
+ }
25
+ ```
26
+ Without it: param defs = every `.arxml` holding `ECUC-MODULE-DEF` (else `$AUTOSAR_PARAMDEFS`, a
27
+ path list), config = every file holding `ECUC-MODULE-CONFIGURATION-VALUES`, input = all other
28
+ `.arxml`. Use the param defs of the release and vendor the project actually targets; the vendor
29
+ BSWMD defs take precedence for vendor-specific parameters.
@@ -0,0 +1,25 @@
1
+ # Symbolic names: how config becomes C symbols
2
+
3
+ **TPS_ECUC_02108 (symbolic name rule).** For a container whose def has a parameter with
4
+ `SYMBOLIC-NAME-VALUE=true` (typically the handle ID, e.g. `ComHandleId`, `PduRDestPduHandleId`,
5
+ `CanIfTxPduId`), the generator emits a `#define` named
6
+
7
+ <Module>Conf_<ContainerDefName>_<ContainerShortName> value = that parameter
8
+
9
+ e.g. `ComConf_ComSignal_DoorLatch`, `PduRConf_PduRDestPdu_Tx_Msg1`. In-house code and other BSW
10
+ modules must use these symbols, never literal IDs. A `*-REF` with `SYMBOLIC-NAME-REFERENCE` uses
11
+ the target's symbolic name.
12
+
13
+ **Consequences for edits.**
14
+ - Renaming a container (SHORT-NAME) renames its symbol: every caller in `Source/` breaks. Run
15
+ `autosar_trace` on the element first to list callers.
16
+ - Handle IDs: often zero-based and dense per module; shared IDs must agree across modules
17
+ (TPS_ECUC_02106). When adding a container with a handle ID, read the siblings and pick the next
18
+ free value per the module's convention; say which convention you assumed.
19
+ - Vendor generators may add prefixes or use different names for vendor-specific containers;
20
+ `autosar_trace` reports links by `method` (`symbolic_name` = rule match, score 1.0;
21
+ `token_match`/`value_match` = heuristic, check the score).
22
+
23
+ **Other generated artefacts.** Const configuration tables (`<Mod>_PBcfg.c`, `<Mod>_Lcfg.c`),
24
+ `<Mod>_Cfg.h` macros (feature switches from booleans such as `…DevErrorDetect`), and callout
25
+ prototypes from FUNCTION-NAME params (the in-house code must define those functions).
@@ -0,0 +1,29 @@
1
+ # The integration loop
2
+
3
+ 1. **Orient.** `ecuc_read` (no path) → modules, files, whether param defs loaded. If it warns that
4
+ no defs were found, stop and ask for the param-def location (or set `paramDefs`); without defs
5
+ nothing is validated and new elements cannot be added.
6
+ 2. **Understand the target.** `ecuc_read path=<container> schema=true` for the allowed params,
7
+ ranges, literals, multiplicity. For cross-module work also read the referenced containers
8
+ (e.g. ComIPdu → EcuC Pdu → PduR routing path → CanIf Tx PDU). `autosar_trace` shows which C
9
+ symbols and callers depend on the element.
10
+ 3. **Edit.** One `ecuc_edit` call with all related ops (it is all-or-nothing). Use `dry_run` to
11
+ show a non-trivial change first. Never write ARXML yourself.
12
+ 4. **Validate.** `ecuc_validate` (scope with `module`/`files` on big projects). Separate findings you
13
+ introduced from pre-existing ones (`arxml_diff` against the committed version helps). Fix yours.
14
+ 5. **Generate.** `autosar_generate` (only with no new errors). If it fails, read its error output,
15
+ map each message to the AUTOSAR path / parameter, fix via `ecuc_edit`, re-validate.
16
+ 6. **Review output.** `arxml_diff` for ARXML outputs; for C, check the expected symbols changed
17
+ (e.g. a new `ComConf_ComSignal_<Name>`).
18
+ 7. **Build.** `autosar_build`; compile/link errors usually mean a renamed/removed symbolic name or a
19
+ callout (FUNCTION-NAME) not implemented in `Source/`. `autosar_trace` the symbol to its config.
20
+ 8. **Report.** List each change as `path` (DEFINITION-REF) old → new, its config class, the
21
+ validation result, generator/build status, and impacted callers.
22
+
23
+ ## Failure handling
24
+ - ECUC-UNKNOWN-DEF everywhere → wrong release/vendor defs loaded; check `paramDefs`.
25
+ - ECUC-REF-UNRESOLVED → the System/SWC ARXML is not in `input`; add it rather than ignoring.
26
+ - `ecuc_edit` rejected a value → it violates the def; do not `force` unless the user confirms the
27
+ def is wrong for their vendor release, and say so.
28
+ - Backend tools (`autosar_trace`, `autosar_config_lookup`) report NOTES such as "data source
29
+ predates the feature, re-ingest it": relay them; the graph needs a re-ingest of the code data source.