今天使用 systick 的时候,只使用了头文件 core_cm4.h,结果就报错了,原因是 __FPU_PRESENT 没有定义,这个定义其实在 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