首页 > 其他 > 详细

core_cm4.h(129): error: #35: #error directive: "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"

时间:2019-10-24 11:16:27      阅读:401      评论:0      收藏:0      [点我收藏+]

今天使用 systick 的时候,只使用了头文件 core_cm4.h,结果就报错了,原因是 __FPU_PRESENT 没有定义,这个定义其实在 stm32f4xx.h 里面。所以如果要解决这个错误,有两种方法:

  1. 只使用 core_cm4.h,然后碰到所有未定义的,都手动定义,或者添加相应的头文件。
  2. 不使用 core_cm4.h,使用 stm32f4xx.h。

比较起来,1 需要包含的头文件比较少,但是操作比较繁琐,2 需要的操作比较少,相应包含的头文件就比较多了。

core_cm4.h(129): error: #35: #error directive: "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"

原文:https://www.cnblogs.com/ramlife/p/11730803.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!