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.
22 lines
1.0 KiB
Python
22 lines
1.0 KiB
Python
"""Check SPI wire address widths for both production EEPROM configurations."""
|
|
from pathlib import Path
|
|
import subprocess
|
|
import os
|
|
import shutil
|
|
import tempfile
|
|
|
|
root = Path(__file__).resolve().parents[2]
|
|
protocol = root.parent / 'newProject/SETGUI/third_party/templates/c/set-protocol'
|
|
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() as folder:
|
|
for profile in (0, 1):
|
|
exe = Path(folder) / f'spi{profile}.exe'
|
|
subprocess.run([compiler, '-std=c99',
|
|
f'-DEEPROM_M95M02={profile}', '-Itests/eeprom_profiles/stubs',
|
|
'-ISource/Internal/Include', '-I' + str(protocol),
|
|
'tests/eeprom_profiles/spi_test.c', '-o', str(exe)],
|
|
cwd=root, check=True)
|
|
subprocess.run([str(exe)], check=True, timeout=10)
|
|
print(f'PASS SPI profile {profile}')
|