Expose the existing registers through Modbus and service CAN using one GAS provider only in M95M02 builds. Include the EEPROM layout/driver, LOAD protection and calibration, firmware identity and shared CCS build workflow. Add transport/profile and SCI8 validation tests, documentation and the checked M95M02 firmware image.
17 lines
783 B
Python
17 lines
783 B
Python
"""Compile the production DAC.c against GPIO/IRQ mocks; no hardware writes."""
|
|
import os
|
|
from pathlib import Path
|
|
import shutil
|
|
import subprocess
|
|
import tempfile
|
|
|
|
root = Path(__file__).resolve().parents[2]
|
|
compiler = os.environ.get('CC') or shutil.which('gcc') or 'C:/msys64/mingw64/bin/gcc.exe'
|
|
os.environ['PATH'] = str(Path(compiler).resolve().parent) + os.pathsep + os.environ['PATH']
|
|
with tempfile.TemporaryDirectory(prefix='load-control-') as tmp:
|
|
exe = Path(tmp) / 'test.exe'
|
|
subprocess.run([compiler, '-Wall', '-Wextra', '-std=c99',
|
|
'-Itests/load_control/stubs', '-ISource/Internal/Include',
|
|
'tests/load_control/load_control_test.c', '-o', str(exe)], cwd=root, check=True)
|
|
subprocess.run([str(exe)], check=True, timeout=10)
|