All notable changes to the norxs Autonomous Safety-Supervisor Gateway (SEooC) are documented here. This project follows Semantic Versioning.
- FPU was never enabled. The image is compiled
-mfloat-abi=hardand the SWCs usesqrtf/atanf, butReset_Handlernever granted CP10/CP11 access in CPACR — on hardware, the first FP instruction raises UsageFault, whose handler stops servicing the watchdog → permanent reset loop. CPACR is now enabled as the very first action inReset_Handlerand re-verified by SBST (SBST_E_FPU). - The MPU was claimed but never programmed. Linker script, README, and docs
referenced "MPU-enforced regions" with zero MPU configuration code. New
os/Mpu_S32G_M7.cprograms a 6-region PMSAv7 map mirroring the linker memory map (ITCM execute/no-write, DTCM/SRAM RW+XN, Shared SRAM non-cacheable shareable, calibration flash RO, peripherals device) with PRIVDEFENA = 0 — any access outside the map raises MemManage, routed to safe state. MemManage is enabled as a dedicated fault (no HardFault escalation). - Scheduler could silently skip activations. The
tick % perioddispatch lost task releases whenever the loop was delayed past a tick boundary. Replaced with per-task release counters (wrap-safe signed comparison); missed releases are now detected, reported as the newDEM_EVENT_OS_TASK_OVERRUN, and the schedule re-synchronizes by whole periods without activation bursts. - Stack-canary failure path led to newlib
_exit(an untimed spin). A project-owned__stack_chk_failnow forces the hardware safe state via watchdog expiry, and__stack_chk_guardis provided with a provisioning AoU (HSE TRNG re-seed). Side effect: the newlib reent/stack-protector dependency chain is no longer linked (−2.7KB text).
os/Sbst.c: startup built-in self-test executed before any SWC init — RAM March C- subset on a dedicated DTCM region (ISO 26262-5 Table D.1, ≈ 90% stuck-at DC), vector table integrity (initial SP + thumb-bit reset vector via the new__isr_vector_startlinker symbol), and FPU-enabled check. A failed self-test reportsDEM_EVENT_SBST_FAILUREand never starts the scheduler.- DEM event catalogue grown 16 → 18 (
OS_TASK_OVERRUN,SBST_FAILURE).
- 9th unit test
sbst_ram_march_test(March C- healthy pass + parameter rejection + host-modeSbst_Run). - Coverage gate in CI: gcov-instrumented build + gcovr, line coverage gated at ≥ 80% over the unit-tested BSW/CDD/OS modules (measured 81.8% line, 89.7% function); Cobertura XML uploaded as a CI artifact.
docs/SRS_TRACEABILITY.md: software safety requirements matrix — 24 SSR items traced requirement → ASIL → implementation → verification method → CI job, with coverage summary and integrator AoU register.
- CMake project version 0.9.2;
NORXS_COVERAGEoption for instrumented test builds; cppcheck CI gate extended oversrc/m7_rtos/os/.
bsw/e2e: corrected the CRC-16-CCITT lookup table. The previous table was internally consistent (protect/check round-trips passed) but did not implement standard CRC-16/CCITT-FALSE behaviour — the known-answer vector"123456789"produced0x69F1instead of0x29B1. Interoperability with any standards-compliant peer (including the A53autosar-soa-gateway) would have failed on every frame. The table is regenerated from the reference bitwise algorithm and locked in CI bycrc16_ccitt_kat_test.bsw/e2e: fixed NULL-pointer dereference inE2E_P5Check/E2E_P22Check(CERT EXP34-C): whenStatus == NULL_PTRthe error path still wrote*Status. Regression-tested bye2e_null_rejection_testunder ASan.bsw/dem:Dem_SetEventStatusreturnedE_OKfor invalid status values (thedefaultrejection branch was overwritten by a trailing assignment). Status values are now validated before mutating the event entry.rte: missing prototypes forRte_Write_SafetyArbitrator_VehicleDynamics_DataandRte_UpdateAiCommandFromIpccaused implicit function declarations inSwcVehicleDynamics.c. Prototypes added toRte_SafetyArbitrator.h.rte: volatile qualifiers no longer cast away when reading inter-runnable variables (3 sites).tools/s32g_m7_safety.ld: added__ssm_bss_start/endsymbols — the Safe State Manager NOLOAD BSS section had no boundary symbols, so startup could not zero it (uninitialized FSM state on cold boot).
src/m7_rtos/os/startup_s32g_m7.c: ARMv7-M vector table,Reset_Handler(.data copy + .bss and MPU-isolated SWC BSS zeroing), fault handlers that force safe state via watchdog expiry, SysTick 1ms OS tick, and a static cyclic scheduler (5ms WdgM / 10ms safety chain / 100ms diagnostics + OTA) with run-to-completion semantics meeting the 20ms FTTI argument. The M7 ELF previously linked with zero text bytes (no entry symbol; all code garbage-collected) — it now produces a real 10.7KB ITCM image.- CMSIS-equivalent
SCB_CleanDCache_by_Addr/SCB_InvalidateDCache_by_Addrimplementations (previously declaredexternbut provided nowhere). - IPC buffers are now actually placed in the A53-visible Shared SRAM section
via
SHARED_SRAM_ATTRon target builds (previously landed in DTCM.bss).
IPC_RingBuffer_ProtectFrame(): producer-side E2E Profile 22 protection. Previously no public API could construct a frame the consumer-side E2E check would accept (the DataID list is channel-private).Dem_GetEventUdsStatus(): ISO 14229-1 §11.2.1 composite status readout (UDS service $19 support) with AUTOSAR SWS traceability tag.OtaRollback.handSwcSafeStateMgr.h: public headers for previously prototype-less modules.
- Unit-test suite expanded from 3 to 8 ctest cases (CRC known-answer, corruption-detection negatives, full IPC round-trip with boundary conditions, ASIL-D redundancy macro upset detection, WdgM alive/deadline supervision, DEM debounce + UDS bits). All run under ASan + UBSan; JUnit XML report uploaded as a CI artifact.
bsw/wdgmis now host-testable through aUNIT_TEST_BUILDSWT register shadow.- Fixed
ASIL_D_SETmacro: the inverse copy is derived from the stored variable (type-correct on any host word size).
SECURITY.md— coordinated vulnerability disclosure policy with triage SLAs (OpenChain ISO/IEC 18974:2023, NIST SP 800-216 aligned).sbom/safety-supervisor-0.9.1.spdx.json— SPDX 2.3 SBOM cataloguing every repository file with SHA-1/SHA-256 checksums; generator attools/generate_sbom.py.NOTICE— third-party and trademark notices (zero bundled third-party code).docs/COMPLIANCE.md— OpenChain ISO/IEC 5230 & 18974 requirement mapping and NIST CSF 2.0 function-by-function implementation table.- CI Job 6
supply-chain-compliance— fails the build on missing compliance artifacts, incomplete SBOM coverage, or missing copyright headers.
- Removed all five
-Wno-error=downgrades: the M7 target now genuinely builds with the full-Werrorwall (-Wmissing-prototypes -Wcast-qual -Wconversion -Wshadow -Wredundant-decls …) with zero warnings. tests/test_main.c(hosted stdio code) removed from the freestanding M7 production image source list.- M7 executable now carries the
.elfsuffix;.hex/.binadded to CI artifacts;arm-none-eabi-sizestep path corrected. - cppcheck gate now covers
src/qnx_a53/and uses a documented deviation-record suppression list (tools/cppcheck_suppressions.txt) — error/warning level findings are never suppressed. - Build documentation corrected: configuration flag is
-DNORXS_TARGET=….
First public release of the Autonomous Safety-Supervisor Gateway SEooC — a production-grade AUTOSAR R25-11 Classic Platform reference implementation for the NXP S32G SoC Cortex-M7 safety cluster.
- Profile 5 (CRC-16-CCITT): variable-length IPC AI command frames (up to 512B)
- Profile 22 (CRC-16-CCITT, 4-bit counter): fixed chassis safety command frames
- CRC-16-CCITT lookup table (256 entries) in
.rodata— zero runtime init cost E2E_CRC16_CCITT()exposed for host-native unit testing
- Alive supervision: expected indication count ± tolerance window per entity
- Deadline supervision: minimum/maximum elapsed time between checkpoints
- Logical program flow (graph) supervision via checkpoint sequence validation
- Hardware SWT (Software Watchdog Timer) service via
WdgM_MainFunction()(5ms period) - Four Supervised Entities:
SA,VD,SSM,IPC_HANDLER - DEM integration:
DEM_EVENT_WDGM_ALIVE_SUPERVISION_FAIL/DEADLINE_FAIL
- 16-event DTC catalogue (0xC101–0xC502) covering Safety, Dynamics, IPC, OTA, CSM
- Freeze frame capture: vehicle speed, yaw rate, steer angle, lateral accel, AI override count
- UDS-compatible status byte (ISO 14229-1 §11.2.1)
- NvM write hook on confirmed failure (
SWS_Dem_00234)
Csm_MacGenerate()/Csm_MacVerify(): CMAC-AES-128 via HSE MUCsm_AES256_Encrypt(): AES-256-CBC for NvM data protectionCsm_GenerateRandom(): TRNG-based secure random byte generationCsm_GetHseStatus(): HSE firmware version + lifecycle state query- 5 pre-provisioned key slots: IPC MAC, OTA verify, Secure Boot, TLS, NvM encrypt
CSM_HSE_TIMEOUT_CYCLES = 10000bounded polling (no infinite wait)
- Bank validity check via HSE RSA-4096 signature verification
- Automatic rollback on: WdgM deadline failure, E2E error accumulation, boot failure
DEM_EVENT_OTA_ROLLBACK_TRIGGEREDon activation
- Section pragmas for:
SAFETY_RAM,SHARED_SRAM,CALIB_DATA,CODE,CONST - Compliant with AUTOSAR R25-11 MemMap specification
- 2-channel SPSC ring buffer (A53→M7 command, M7→A53 status)
- 16 slots × 80-byte
IPC_FrameType(32-byte aligned, cache-line isolated) WriteIdxandReadIdxpadded to separate 64-byte cache lines (false-sharing prevention)- LDREX/STREX atomic index update (ARMv7-M exclusive load/store)
__DSB()/__DMB()CMSIS barriers before/after cross-core writes- E2E CRC-16 + counter embedded in every frame header
- Frame types: AI steer cmd, AI accel cmd, safety status, DEM event
- Inter-Runnable Variables (IRV):
SA_SafeStateActive,SA_MaxSteerAngle_deg,SA_MaxYawRate_radps,SA_MuRoad,SA_VehicleSpeed_mps Rte_Read_*/Rte_Write_*macros for VFB-compliant data accessASIL_D_REDUNDANT_VARstorage for all safety-critical IRVs
- Static bounds check: steer lock-to-lock, peak acceleration, rollover threshold
- Dynamic envelope:
steer_max = arctan(μ·g·0.7 · L / v²)(Ackermann geometry) - Yaw rate limit:
ψ̇_max = μ·g·0.7 / v - ASIL-D redundancy check (
ASIL_D_CHECK) on all safety-critical variables before arbitration - WdgM checkpoint instrumentation: ENTRY, ENVELOPE_CHECK, EXIT
- Override action: DEM event + freeze frame + NvM persist + Safe State command
- Wheel speed L/R delta check (threshold: 2.0 rad/s)
- Kinematic yaw rate from wheel speeds vs IMU gyro plausibility (threshold: 0.3 rad/s)
- Burckhardt friction model:
μ_raw = √(Ay² + Ax²) / g - 1st-order LP filter:
μ_filt[n] = 0.05·μ_raw + 0.95·μ_filt[n-1]
- Cubic Hermite smooth-step interpolation:
s(t) = 3t² - 2t³ - Jerk-bounded deceleration ramp:
a(t) = a_start·(1 - s(t)) - FSM: IDLE → ACTIVE → RETURN → COMPLETE with DEM event at each transition
- Token Bucket rate limiter per SOME/IP client ID (burst 20, refill 5/ms)
- SOME/IP client ID whitelist firewall (UN R155 §7.3.3)
- MAC verification via IPC call to M7 CSM
- Audit log ring buffer (128 entries) with POSIX
clock_gettime(CLOCK_MONOTONIC)
- Three targets:
M7(arm-none-eabi),A53(QNX aarch64),TEST(host-native) -Werroron all targets — zero warnings policy-fstack-usage→.sufiles for stack analysis (ISO 26262 §7.4.10)- ASan + UBSan on TEST target for host-native CI
POST_BUILD: auto-generates.hexand.binfor flash programmingmisra_checktarget placeholder for PC-lint Plus / Polyspace integration
- Job 1: Host-native unit tests (ASan + UBSan, Ubuntu 24.04)
- Job 2: M7 cross-compile (arm-none-eabi-gcc, -Werror)
- Job 3: Stack usage analysis (unbounded stack
?detection = CI failure) - Job 4: MISRA C static analysis (cppcheck proxy, zero-error gate)
| Standard | Coverage |
|---|---|
| ISO 26262 Part 6 ASIL-D | ASIL_D_REDUNDANT_VAR, WdgM LET, E2E Profile 5/22, zero heap, stack bounds |
| AUTOSAR R25-11 Classic | BSW (E2E, WdgM, DEM, CSM), CDD, RTE, SWC architecture |
| MISRA C:2023 | -Werror, -Wpedantic, -Wmissing-prototypes, -Wstrict-prototypes |
| UN R155 §7.3 | IDPS Token Bucket, CMAC-AES-128 IPC auth, DEM audit trail |
| ISO 14229-1 (UDS) | DEM event status byte, DTC format 0xCXYZ |
For commercial licensing, ASIL-D safety evidence packages, and ASPICE process documentation, contact norxs Technology LLC at https://norxs.com