defines.txt with RTW -> Simulink Coder

6 visualizaciones (últimos 30 días)
Janosch Mehlei
Janosch Mehlei el 8 de Mayo de 2023
Editada: David el 4 de Oct. de 2024
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

Respuestas (1)

Adit Kirtani
Adit Kirtani el 18 de Mayo de 2023
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 comentarios
Janosch Mehlei
Janosch Mehlei el 22 de Mayo de 2023
Thanks! I already figured this out last week and get used to it. ;)
David
David el 4 de Oct. de 2024
Editada: David el 4 de Oct. de 2024
@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.

Iniciar sesión para comentar.

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by