How can I define my "asm" variable in my model Simulation Target using StateFlow?
조회 수: 2 (최근 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!