Merge origin/ump-v4 into main

Combine Flash CAN updates, signal processing and HOPE pin fixes with current Modbus/GAS, STM32 ports and CCS release exports. Resolve protocol, documentation and Qt conflicts; deduplicate Android JNI sources and include gauge/IGBT sources in host builds.
This commit is contained in:
2026-11-07 01:32:27 +03:00
136 changed files with 8828 additions and 821 deletions
+3 -2
View File
@@ -26,6 +26,7 @@ SOURCES = [
ROOT / "src" / name for name in (
"deif_xdi.c", # Общий DEIF входит в host-библиотеку.
"set_invertor_gas.c", # Собирает общий адаптер двух GAS для STM Invertor при прямом запуске host-builder.
"set_deif_gauge.c", "set_igbt_realtime.c",
"set_regmap.c", "set_emu_ump.c", "set_emu_tms.c", "set_emu_igbt.c", "set_emu_server.c", "set_boot.c",
"firmware_image.c", "altera_logic.c",
"altera_stream.c",
@@ -65,7 +66,7 @@ def _build_msvc(output: Path, build_dir: Path) -> None:
import_library = build_dir / "setprotocol.lib"
jni_flags = " ".join(f'/I"{path}"' for path in JNI_INCLUDES)
command = (
f'call "{vcvars}" && cl /nologo /W4 /std:c11 '
f'call "{vcvars}" && cl /nologo /W4 /O2 /std:c11 ' # Оптимизируем исходный C-решатель, чтобы сравнение с оптимизированным Eigen не измеряло различие режимов компиляции.
f'/DPCAN_ABI_BUILD_DLL /I"{INCLUDE}" {jni_flags} /LD {quoted_sources} '
f'/Fe"{output}" /link /IMPLIB:"{import_library}"'
)
@@ -78,7 +79,7 @@ def _build_cc(output: Path, build_dir: Path) -> None:
compiler = shutil.which("cc") or shutil.which("clang") or shutil.which("gcc")
if compiler is None:
raise SystemExit("C compiler was not found")
command = [compiler, "-std=c99", "-Wall", "-Wextra", "-Wpedantic",
command = [compiler, "-O2", "-std=c99", "-Wall", "-Wextra", "-Wpedantic", # Одинаковая оптимизация C99 и C++ делает время настольных вариантов сопоставимым.
"-fPIC", "-shared", f"-I{INCLUDE}",
*(f"-I{path}" for path in JNI_INCLUDES), *map(str, SOURCES),
"-o", str(output), "-lm"]