Generated code file name Suffixed with 0

5 ビュー (過去 30 日間)
TAB
TAB 2015 年 12 月 7 日
コメント済み: Evgeni Verbitski 2025 年 2 月 18 日 18:16
I am not having good time with 8.x Matlab release :(
Tons of problem.
One of the problem is, when I generated code from Simulink model, the generated files name and model data variables name are suffixed with 0.
I am using AUTOSAR Target Production Package 6.5.3. Model is imported from arxml and implementation is added. Whenever I am doing "Export function" for top level subsystem, code is being generated like this:
ModelName - XYX_abc.slx
TopLevel Subystem Name - abc
Generated code files: abc0.c, abc0.h, abc0_private.h, abc0_types.h
Same thing is happening if I generate code from command line using:
rtwbuild('XYX_abc/abc', 'Mode', 'ExportFunctionCalls');
I am using R2013b with Embedded Coder license.
Same thing I was doing with R2011b from last more than 3 years but never faced any such issue.
  2 件のコメント
Steven Lord
Steven Lord 2015 年 12 月 7 日
Did you already have files abc.c, abc.h, etc. in the directory in which the abc0.c, abc0.h, etc. files were generated? If so what happens when you move to a different directory or rename abc.c, abc.h, etc.?
TAB
TAB 2015 年 12 月 8 日
There is nothing in the model directory. I am starting code generation from fresh.
Still code files are generated with 0 suffix.

サインインしてコメントする。

採用された回答

Nicolae Cleju
Nicolae Cleju 2016 年 6 月 8 日
I had the same problem. In my case I had to change the file name so that it is different from the name of the toplevel subsystem in order to fix this.

その他の回答 (1 件)

Yerik Hedrick
Yerik Hedrick 2018 年 5 月 14 日
I had the same problem too. And I find that the problem is due to the name of your model file is the same with the subsystem in your top layer. This problem may be caused by code generation setting, but I don't know which setting is related to the character. If you open a new bland model with the default settings, this problem won't appear.
  1 件のコメント
Evgeni Verbitski
Evgeni Verbitski 2025 年 2 月 18 日 18:16
I renamed my test-harness model. It worked for me. Thank you!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by