How can I define my "asm" variable in my model Simulation Target using StateFlow?
4 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I have added certain directories containing my hedaers/implementation files in Simulation Target >> Include Directories that I will make use.
When running the model, which is nothing more that the default example with my directories, I am running into an issue where Matlab cannot find __asm__ as stated
Error c:\\j\\documents\\matlab\\acquisition.c: c:\\localdata\\projects\\firmwareprojects\\fw\\support\\my_math.h: 97 undeclared identifier '__asm__'
Error c:\\j\\documents\\matlab\\acquisition.c: c:\\localdata\\projects\\firmwareprojects\\fw\\support\\my_math.h: 97 Syntax error; missing semicolon before `volatile'
Looking the file my_math.h at line 97 I have the following function
static inline unsigned __abs(int value)
{
unsigned result; // ABS inputval, outputval
__asm__ volatile("ABS %1, %0" : "=r" (result) : "r" (value));//line 97
return result;
}
How can I define the variable asm so that I can compile the model?
I have tried to define the variable under the Defines option as shown below but not luck.
THanks in advance,
0 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!