How do I set include paths for accelerated referenced sub-models?

1 次查看(过去 30 天)
I am using 2014b Matlab and Simulink.
I have a referenced sub-model with an EML block that references C code defined in a header file. In Normal mode, I can include the header file in the configuration parameters dialog in Simulation Target->Custom Code panel under Source file and Header file, and set up the include path there as well. This appears to be completely ignored in accelerated mode. I blindly tried setting the equivalent paths in the Code Generation area, but that did nothing as well.
I get a little closer by using coder.cinclude('custom_code.h') in the EML block, so it attempts to include the proper header file, but the building of the C files for the accelerated model still does not have a defined include path, so I get a build error on not being able to open the include file.
Two questions: 1) why doesn't building in accelerated mode use exactly the same simulation target parameters as normal and 2) given that that is broken (or, more likely, I am not seeing the "big picture,") how can I get an include path to the build of the accelerated mode referenced sub-model?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

产品


Translated by