2

Today I've been getting this error in my code stating:

RTE\Device\STM32F407VGTx\startup_stm32f407xx.s(191): A1163E: Unknown opcode R0, expecting opcode or macro

Here is the area of code where it stops at:

Error

I have not performed any assembly in the code that I have written, which seems like a common reason why this message appears. Would anyone be kind enough to help me troubleshoot this issue? This is my first time programming with an STM32F4 board, so I am not entirely sure where to begin looking :(

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
Andrew T
  • 783
  • 4
  • 11
  • 20

1 Answers1

4

I took a break from looking at my code, and when I came back, I randomly pressed TAB before the LDR statement and the code can now successfully compile with 0 errors and 0 warnings!

Andrew T
  • 783
  • 4
  • 11
  • 20
  • 1
    In some assemblers, anything in the left-most column is assumed to be a label, not a mnemonic, even if it *is* also a valid mnemonic. Apparently ARMasm is one of those assemblers. GNU assembler is not; you'd need `ldr:` to define a symbol called `ldr`, otherwise it would be assumed to be an instruction. – Peter Cordes Mar 09 '21 at 12:13