C语言 错误:选定的处理器不支持 ARM 模式“wfi”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13686357/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error: selected processor does not support ARM mode `wfi'
提问by andre
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 wfeare not ASM instruction. How could I fix this?
我在尝试编译 ARM 嵌入式 C 程序时遇到以下错误(我使用 YAGARTO 作为我的交叉编译器)。我正在尝试弄清楚这个错误意味着什么以及纠正它的步骤是什么。从我到目前为止所做的研究来看,问题似乎是wfi,而wfe不是 ASM 指令。我怎么能解决这个问题?
\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
回答by Turbo J
You might miss some vital compiler options for your STM32F10x - which is a Cortex M3:
您可能会错过 STM32F10x 的一些重要编译器选项 - 这是 Cortex M3:
-mcpu=cortex-m3 -mthumb -mno-thumb-interwork -mfpu=vfp -msoft-float -mfix-cortex-m3-ldrd

