This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler: Syntax to compile assembly code embedded in C with TI compiler

Guru* 95265 points

Tool/software: TI C/C++ Compiler

Champs,

I have a .c file with several embedded assembly code like this:

unsigned int get_clock(void)

{
unsigned int cc;
__asm__ __volatile__ ("mrc p15, 0, %0, c9, c13, 0\t\n" : "=r"(cc));
return cc;
}

when compiling with ARM GNU compiler, there is no issue. When compile with TI 17.3.LTS compiler, there is syntax error:

 error #18: expected a ")"

What is the correct syntax for this?

Regards, Eric