12

I'm getting the following errors while trying to compile an ARM embedded C program (I'm using YAGARTO as my cross compiler). I'm trying to work out what this error means and what are the steps to correct it. From the research I've done so far, the issue it seems to be wfi, and wfe are not ASM instruction. How could I fix this?

\cc9e5oJe.s: Assembler messages:
\cc9e5oJe.s:404: Error: selected processor does not support ARM mode `wfi'
\cc9e5oJe.s:414: Error: selected processor does not support ARM mode `wfe'
\cc9e5oJe.s:477: Error: selected processor does not support ARM mode `wfi'
make: *** [STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.o] Error 1
old_timer
  • 69,149
  • 8
  • 89
  • 168
andre
  • 7,018
  • 4
  • 43
  • 75

1 Answers1

14

You might miss some vital compiler options for your STM32F10x - which is a Cortex M3:

-mcpu=cortex-m3 -mthumb -mno-thumb-interwork -mfpu=vfp -msoft-float -mfix-cortex-m3-ldrd
Turbo J
  • 7,563
  • 1
  • 23
  • 43
  • Thanks I'm no longer getting the error. This seemed to have worked. I'll have to research what they all mean. – andre Dec 03 '12 at 16:36
  • 3
    @ahenderson ARM devices have a few different instruction sets and [Cortex-M3 implements a version of Thumb](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337i/index.html). By default your toolchain was targeting ARM mode, thus was the error. – auselen Dec 03 '12 at 16:38