defines.txt with RTW -> Simulink Coder

7 ビュー (過去 30 日間)
Janosch Mehlei
Janosch Mehlei 2023 年 5 月 8 日
編集済み: David 2024 年 10 月 4 日
Hello,
I've used the Real Time Workshop with Matlab R2013b (win32) for years to generate C code out of Simulink models. System target file is grt.tlc. After the code generation process was completed, a file defines.txt was created in the build folder example_grt_rtw for every single model. The content of the file was:
MODEL=model_a
NUMST=1
NCSTATES=0
HAVESTDIO
RT
USE_RTMODEL
MAT_FILE=1
INTEGER_CODE=0
MT=0
CLASSIC_INTERFACE=1
ONESTEPFCN=0
TERMFCN=1
MULTI_INSTANCE_CODE=0
TID01EQ=0
This file was further used by a customized script to generate code for my target system.
Now i have to use Matlab R2022b (win64) and stuck because a defines.txt file isn't generated anymore. Tried with toolchains LCC-win64 v2.4.1|gmake(64bit) and MinGW64|gmake(64bit) with same result. Also, the file content is not part of any other file generated in the built folder.
I would be very thankfull for any answer or hint.
Greetings, J

回答 (1 件)

Adit Kirtani
Adit Kirtani 2023 年 5 月 18 日
Hi Janosch,
In MATLAB R2022a the generation of the “defines.txt” file has been removed as the information it contained is stored in the buildInfo.mat file. This information can be accessed by loading “buildInfo.mat” and using the “getDefines” API. You can view this information using these following commands:
%cd to your rtw folder
load buildInfo.mat
buildInfo.getDefines()
I hope this helps,
Adit Kirtani.
  2 件のコメント
Janosch Mehlei
Janosch Mehlei 2023 年 5 月 22 日
Thanks! I already figured this out last week and get used to it. ;)
David
David 2024 年 10 月 4 日
編集済み: David 2024 年 10 月 4 日
@Adit Kirtani, I'm using 22a. Is there an option or approach I can use to turn this feature back on?
We use the PackageGeneratedCodeAndArtifacts feature to create a .zip to distrubute to another group for integration.
In 21b, defines.txt was automatically generated and added to the .zip package. Is there a method I can use to restore this functionality?
The method needs to be automated when hitting ctrl-b or using slbuild.

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

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by