A1616E armcc compile error

I got compile error "Error: A1616E: Instruction, offset, immediate or register combination is not supported by the current instruction set"

For below routine 

__asm uint32_t A(void)
{
    MRS R0, MSP       ====> line pointed by error message
    LDR R0, [R0,#8]

    ...


    BX lr
}

for both Arm compiler 4.1 and 5.06.  What I am missing here?  thanks...

Parents
  • Hello, I quickly tested with Arm Compiler 5.06, and was able to build.

    I suspect you have not specified the processor/architecture on the command line - do you have --cpu=Cortex-M3 or similar on the command line?

    Also, please note these are very old compilers, no longer supported. If you are starting a new project, I urge you to move to armclang.

Reply
  • Hello, I quickly tested with Arm Compiler 5.06, and was able to build.

    I suspect you have not specified the processor/architecture on the command line - do you have --cpu=Cortex-M3 or similar on the command line?

    Also, please note these are very old compilers, no longer supported. If you are starting a new project, I urge you to move to armclang.

Children