defines.txt with RTW -> Simulink Coder

조회 수: 12 (최근 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 CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by