How to make Embedded coder use isnan C-API than implementing custom code?
12 ビュー (過去 30 日間)
古いコメントを表示
My Simulink model uses NaN and some places there is check of same using matlab function isnan().
When I am genertaing C-code using embedded coder, i see generated code has custom implementation of isnan function like below
/* Test if value is not a number */
boolean_T rtIsNaN(real_T value)
{
return (boolean_T)((value!=value) ? 1U : 0U);
}
How can I avoid this and allow EC to use isnan API from math.h from my toolchain. If I use above implementation, it doesnot work as expected in some of my cores which doesnt have FPU. Replacing this and Calling isnan() from math.h works fine for me.
I did web-search but couldnt find any help on this topic.
0 件のコメント
回答 (2 件)
Naman Bhaia
2019 年 5 月 24 日
I believe Code Replacement Customization can be the possible solution. To implement that, you could develop a code replacement library by referring to this link.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Kernel Creation from Simulink Models についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!