Can not use the code mappings API to configure model

조회 수: 16 (최근 30일)
Chuyen
Chuyen 2025년 2월 18일
답변: Harsh 2025년 6월 19일
Dear all,
I got an issue with using code mappings API with this command: cm = coder.mapping.api.get(bdroot), the error I got when giving this command is:
Model 'Sample_AR24b' is configured with system target file autosar.tlc or autosar_adaptive.tlc or is GRT-based with
model configuration parameter 'Code interface packaging' set to 'C++ class'. To use the code mappings API to configure this model, change system target file or set 'Code interface packaging' to 'Nonreusable function' or 'Reusable function'.
However, Target Language of my model is C and of cource ' Code interface packaging' was "Nonreusable function" already. And as you can see, I still got the error which realized my model as an "C++ class". Can you please tell me what I am doing wrong here and what is the solution?
Thank you so much!

답변 (1개)

Harsh
Harsh 2025년 6월 19일
I understand that you have verified "Code Interface Packaging" to be "Nonreusable function" and also the "Target Language" is set to C but you still get the error stated in your question. This must mean that your "System target file" is set to either "autosar.tlc" or "autosar_adaptive.tlc" for which the code mappings API is not supported. Please run the following command to verify this -
get_param(bdroot, 'SystemTargetFile')
Now to change your "System target file" please select "Code Generation" from the left pane in "Configuration Parameters" window. Then You can click on "Browse" to select "ert.tlc" or "grt.tlc"
I hope this resolves your query!

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by