Embedded Coder: function to receive decoded Macro

1 回表示 (過去 30 日間)
Marcel
Marcel 2023 年 2 月 2 日
回答済み: Mark McBroom 2023 年 2 月 4 日
Hey everyone,
I know that I can read out the name of the code file with:
cs = Simulink.ConfigSet;
cs.get_param('ERTSourceFileRootName'); %Source File -> e.g. example.c
cs.get_param('ERTHeaderFileRootName'); %Header File -> e.g. example.h
Unfortunately this is not returning the decoded name of the file (example.c/h) but the actual macro '$R$E'.
My goal is to access the code file name as direct as possible (without workaround with [bdroot '*.c'] or similiar).
I wonder if there is a function to decode the macro '$R$E' in the current context?
Thanks a lot for your help in advance!

回答 (1 件)

Mark McBroom
Mark McBroom 2023 年 2 月 4 日
After code is generated, you can load the file buildinfo.mat. This data object contains names of all generated source and header files.

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by