Keil Logo

µVISION: Dynamic Syntax Checking Shows Errors for Embedded Assembler


Information in this knowledgebase article applies to:

  • Keil MDK version 4.70 and later
  • Arm Compiler 5 all versions

QUESTION

I'm using the embedded assembler in one of my C-function. In the µVision editor, the Dynamic Syntax Checking shows me some errors for this function. Here is an example:

When I hover the mouse over these red error symbols, I see the following error messages:

error: expected '(' after 'asm'
error: expected ';' after top-level asm block

and

error: use of undeclared identifier 'mov'

However, when I build my project, the compiler does not report any errors. 

Why does the Dynamic Syntax Checking report these errors and how can I avoid them?

ANSWER

In this example, the embedded assembler of the Arm compiler 5 is used. The Dynamic Syntax Checking uses the same compiler-frontend as our Arm compiler 6. Since the syntax for the embedded assembler of Arm compiler 5 is different to the inline assembler of Arm compiler 6, this syntax is not recognized and errors are generated.

It is not planned to change this behavior. If you stay with Arm compiler 5, you need to ignore these errors or turn off Dynamic Syntax Checking. You might consider to use the Arm compiler 6 in the future to avoid this effect.

MORE INFORMATION

Last Reviewed: Thursday, January 7, 2021


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.