cutfall 发表于 2025-3-27 11:00

编译器为没有 生成 FPU 指令

使用 CubeMX 生成代码并将 DSP 库从 CubeMX 存储库复制到 project/Drivers 文件夹后编译后提式:Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)在 core_cm4.h 中, SOFTFP 已定义,因此 FPU_USED 将设置为 0。
#elif defined ( __GNUC__ ) #if defined (__VFP_FP__) || !defined(__SOFTFP__)#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)   #define __FPU_USED    1U#else   #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"   #define __FPU_USED    0U#endif #else#define __FPU_USED   0U #endif

香水城 发表于 2025-3-28 16:46

也不知你用的什么IDE,其实也没啥复杂配置。


这篇文章参考下,基于ARM MDK IDE,涉及FPU应用的一些基本配置和注意点。

关于STM32浮点运算单元FPU的小话题

梅花香自123 发表于 2025-3-31 22:48

编译器生成了需要浮点运算单元(FPU)支持的代码,但是目标芯片并不具备硬件 FPU。
页: [1]
查看完整版本: 编译器为没有 生成 FPU 指令