Why do I get a build error when generating a code for model containing stateflow in MATLAB 2011b "error calling s generated S function" ?
5 ビュー (過去 30 日間)
古いコメントを表示
Why do I get a build error when generating a code for model containing stateflow "error calling s generated S function" ?
Model simulates properly, when build system to generate code is selected the following error is got in MATLAB 2011b. The model has a stateflow and I'm taking a guess its because of this.
Error recieved is : Error calling generated Sfunction, model_sfun. Undefined function 'model_sfun' for input arguments of type 'double'
0 件のコメント
回答 (1 件)
Gerhard Feichtinger
2015 年 7 月 8 日
I just had the same error in 2015a, and it seems to be because I was setting the Simulink CodeGenFolder and CacheFolder parameters to nonstandard values. I'm not sure if there's a similar StateFlow value to set, but commenting out these lines from my setup file fixed the issue. So maybe it's something that you set up for Simulink that Stateflow is expecting in a different location?
% Simulink.fileGenControl('set', 'CacheFolder', [userpath '/_code_dummy_'], 'createDir', true)
% Simulink.fileGenControl('set', 'CodeGenFolder', [userpath '/_code_dummy_'], 'createDir', true)
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!