Exclude custom storage class parameters from ASAP2 generation
显示 更早的评论
Hi, I created a custom storage class for my Simulink project. And ASAP2 file generation is enabled for my project.
But I want the parameters that use this custom storage class to not be included in the ASAP2 file. Is there a way to specify to exclude certain custom storage class parameters from ASAP2 generation?
回答(1 个)
Nirupama
2024-1-22
Starting from R2022b,
- Open model.
- Build model.
- Use "coder.asap2.getEcuDescriptions" to fetch ECU descriptions in an ASAP2 file.
- Pass the obtained description data and the parameter to be removed from the ASAP2 file into the "delete" function.
- Generate A2L/ASAP2 file.
Sample code:
open_system("ASAP2Demo");
rtwbuild("ASAP2Demo");
descObj = coder.asap2.getEcuDescriptions("ASAP2Demo");
delete(descObj,"Characteristic","Custom_parameter1");
coder.asap2.export("ASAP2Demo",CustomEcuDescriptions=descObj);
For more information, refer to:
- https://www.mathworks.com/help/ecoder/ref/coder.asap2.getecudescriptions.html.
- https://www.mathworks.com/help/rtw/ref/coder.asap2.getecudescriptions.delete.html
Regards,
Nirupama
类别
在 帮助中心 和 File Exchange 中查找有关 Generated Code Interfacing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!