Why do I get the error "Automatically map all unmapped Simulink elements to AUTOSAR properties. - Apply" when trying to export from a AUTOSAR architecture model?

18 views (last 30 days)
I refined the AUTOSAR configuration programmatically according to the following manual.
https://www.mathworks.com/help/releases/R2021b/autosar/ug/sample-scripts-that-use-autosar-property-and-map-functions.html
Then I get the following error when trying to export a AUTOSAR architecture model.
>> export(archModel)
Error using tlc_c
  Entry-point function 'Initialize Function' is not mapped to an AUTOSAR runnable.
  Suggested Actions:
    • Automatically map all unmapped Simulink elements to AUTOSAR properties. - Apply
   - Show complete stack trace

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 8 Dec 2021
This error is caused by not assigning a function after setting Runnable.
Please map the modified AUTOSAR runnable to Simulink initialize as below.
slMap=autosar.api.getSimulinkMapping(elemName);
mapFunction(slMap, 'Initialize', initRunnableName);

More Answers (0)

Tags

No tags entered yet.

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!