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.

CCS/EK-TM4C1294XL: Facing error #18 while compiling assembly code in c file

Part Number: EK-TM4C1294XL

Tool/software: Code Composer Studio

Hi,

I am trying to compile the following code,

int main(void)

{

int val = 50;

__asm volatile (" MOV R0, %0": :"r"(val));

return 0;

}

Upon compilation, I am facing this issue,

error #18: expected a ")"

This error occurs at the second line of this code snippet (i.e. at the __asm line).

I'm using Code Composer Studio Version: 10.0.0.00010 (Compiler version : TI v20.2.0.LTS).

Please advise.