STM32F103固件库编程:关于core_cm3.c的错误
STM32F103固件庫編程:關于core_cm3.c的錯誤。
解決方法有兩種:
1。直接刪除固件庫中的core_cm3.c文件,keil已有替代文件。
2。ARM編譯器版本從6,改回到5。
提示錯誤如下:
../Lib/CMSIS/CM3/CoreSupport/core_cm3.c(445): error: non-ASM statement in naked function is not supported
? uint32_t result=0;
? ^
../Lib/CMSIS/CM3/CoreSupport/core_cm3.c(442): note: attribute is here
uint32_t __get_PSP(void) __attribute__( ( naked ) );
????????????????????????????????????????? ^
../Lib/CMSIS/CM3/CoreSupport/core_cm3.c(465): error: parameter references not allowed in naked functions
????????????????? "BX? lr???? \n\t" : : "r" (topOfProcStack) );
???????????????????????????????????????????? ^
../Lib/CMSIS/CM3/CoreSupport/core_cm3.c(461): note: attribute is here
void __set_PSP(uint32_t topOfProcStack) __attribute__( ( naked ) );
???????????????????????????????????????????????????????? ^
../Lib/CMSIS/CM3/CoreSupport/core_cm3.c(479): error: non-ASM statement in naked function is not supported
? uint32_t result=0;
? ^
../Lib/CMSIS/CM3/CoreSupport/core_cm3.c(476): note: attribute is here
uint32_t __get_MSP(void) __attribute__( ( naked ) );
????????????????????????????????????????? ^
../Lib/CMSIS/CM3/CoreSupport/core_cm3.c(499): error: parameter references not allowed in naked functions
????????????????? "BX? lr???? \n\t" : : "r" (topOfMainStack) );
???????????????????????????????????????????? ^
../Lib/CMSIS/CM3/CoreSupport/core_cm3.c(495): note: attribute is here
void __set_MSP(uint32_t topOfMainStack) __attribute__( ( naked ) );
???????????????????????????????????????????????????????? ^
4 errors generated.
compiling core_cm3.c...
".\Objects\F102-TEMP.axf" - 4 Error(s), 0 Warning(s).
Target not created.
?
總結
以上是生活随笔為你收集整理的STM32F103固件库编程:关于core_cm3.c的错误的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 清华大学研究称国内多城市饮用水含高浓度P
- 下一篇: STM32F1和STM32F4 区别