Inconsistent AUTOSAR code generation between MATLAB R2023b Update 9 and Update 10 (temp variable vs direct Rte_Write calls) – need root cause and resolution
24 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Sivaram
el 26 de Sept. de 2025 a las 10:28
Comentada: Steven Lord
el 2 de Oct. de 2025 a las 2:38
We are facing inconsistent AUTOSAR code generation across PCs using MATLAB R2023b.
Scenario:
Model: Switch block with constants (enum values) feeding an RTE port.
Config: Same model, same configuration set, same dictionary, same toolchain (MSVC v15).
PC 1 (R2023b Update 9): Generated code introduces a temporary variable, assigns it in both if/else branches, then calls Rte_Write(temp).
PC 2 (R2023b Update 10): Generated code directly calls Rte_Write() in each branch without using a temp variable.
Problem:
The direct Rte_Write() calls cause build issues in our toolchain. We need deterministic and consistent code generation across PCs, regardless of MATLAB update level.
Request:
1. What is the root cause of this difference between Update 9 and Update 10?
2. Is this change intentional in Embedded Coder/AUTOSAR code generation?
3. How can we configure MATLAB/Embedded Coder to always generate code using a temporary variable before Rte_Write(), ensuring consistent behavior across all PCs and updates?
2 comentarios
Angelo Yeo
el 1 de Oct. de 2025 a las 22:34
Please reach out to technical support team. TS team has close connection with DEV which can better help you about version update issue.
Steven Lord
el 2 de Oct. de 2025 a las 2:38
Respuestas (0)
Ver también
Categorías
Más información sobre AUTOSAR Blockset en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!