This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

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
  • Hi Ronan, thanks for looking into it.  My command is as below, in Arm Studio:

    'Building file: ../src/main.c'
    'Invoking: Arm C Compiler for Embedded 5.6.6'
    armcc.exe --cpu=Cortex-R5 --arm --apcs=interwork -O0 -g --md --depend_format=unix_escaped --no_depend_system_headers --depend_dir="src" -c -o "src/main.o" "../src/main.c"
    "..\src\main.c", line 29: Error: A1616E: Instruction, offset, immediate or register combination is not supported by the current instruction set
    29 00000000 MRS R0, MSP

    Btw, if I remove "MSP", and use another special register, such as "SCTLR", it passed build

  • You are building for Cortex-R5, which does not support MSP (Main Stack Pointer).

    MSP is only provided on Cortex-M processors.