defines.txt with RTW -> Simulink Coder
3 次查看(过去 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
0 个评论
回答(1 个)
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 个评论
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.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!