defines.txt with RTW -> Simulink Coder

9 次查看(过去 30 天)
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.

类别

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