Search code examples
assemblyrtos

Sciopta RTOS assembly error


I don't know much about assembly, but when I was trying to build a project that uses Sciopta RTOS and Cortex A processor, it produced the following error:

    Error[401]: Operand syntax error
    mrc     p15, #0, r0, c9, c14, #2
-----------------^

In the file cortex_a.s

Does anyone have an idea about this problem ?


Solution

  • From the error code and text, it looks like you are using the IAR assembler, but the .s extension is a GNU assembler convention, so possibly the code is written for the GNU assembler rather they IAR and they differ in this respect.

    My guess would be to remove the # since there is no option other than an immediate operand so it is implicit. This is supported by the release notes here, which have the following note:

    In EWARM 6.50.2:

    The instructions MCR and MRC now allow # before operation code operands also in Thumb mode.

    [EW23559]

    Presumably your version of EWARM is older?