新建一个工程,在Options for Target中的C/C++的Define中加入ARM_MATH_CM4 __FPU_PRESENT=1启用FPU
然后使用arm_math.h库中的任何一个有关浮点运算的方法都会报下边的错误
- arm_max_f32.o attributes are not compatible with the provided cpu and fpu attributes .
- Object arm_max_f32.o contains Build Attributes that are incompatible with the CPU attributes.
我使用了一条求浮点数最大值的函数然后就报了下边的错误
- arm_max_f32(buf, 50, &maxValue, &maxIndex);
- .\Flash\Blinky.axf: Error: L6366E: arm_max_f32.o attributes are not compatible with the provided cpu and fpu attributes .
- Object arm_max_f32.o contains Build Attributes that are incompatible with the CPU attributes.
- Tag_VFP_arch = Use of the ARM v8-A FP ISA was permitted, but only citing registers D0-D15, S0-S31 (=8)
- .\Flash\Blinky.axf: Error: L6367E: arm_max_f32.o(.rev16_text) attributes are not compatible with the provided cpu and fpu attributes .
- Object arm_max_f32.o contains Build Attributes that are incompatible with the CPU attributes.
- Tag_VFP_arch = Use of the ARM v8-A FP ISA was permitted, but only citing registers D0-D15, S0-S31 (=8)
- .\Flash\Blinky.axf: Error: L6367E: arm_max_f32.o(.revsh_text) attributes are not compatible with the provided cpu and fpu attributes .
- Object arm_max_f32.o contains Build Attributes that are incompatible with the CPU attributes.
- Tag_VFP_arch = Use of the ARM v8-A FP ISA was permitted, but only citing registers D0-D15, S0-S31 (=8)
- .\Flash\Blinky.axf: Error: L6367E: arm_max_f32.o(.rrx_text) attributes are not compatible with the provided cpu and fpu attributes .
- Object arm_max_f32.o contains Build Attributes that are incompatible with the CPU attributes.
- Tag_VFP_arch = Use of the ARM v8-A FP ISA was permitted, but only citing registers D0-D15, S0-S31 (=8)
- .\Flash\Blinky.axf: Error: L6367E: arm_max_f32.o(.text) attributes are not compatible with the provided cpu and fpu attributes .
- Object arm_max_f32.o contains Build Attributes that are incompatible with the CPU attributes.
- Tag_VFP_arch = Use of the ARM v8-A FP ISA was permitted, but only citing registers D0-D15, S0-S31 (=8)
- Not enough information to list image symbols.
- Not enough information to list the image map.
- Finished: 12 information, 0 warning and 5 error messages.
最后没有办法了,在Select Software Packs for Target中把ARM::CMSIS的版本从4.5.0改成4.4.0后解决,不知道为什么会出这个问题。