[讨论] STM32F4使用MDK5更新最新版的ARM::CMSIS编译遇到问题

littleshrimp   2015-12-9 15:59 楼主
新建一个工程,在Options for Target中的C/C++的Define中加入ARM_MATH_CM4 __FPU_PRESENT=1启用FPU
然后使用arm_math.h库中的任何一个有关浮点运算的方法都会报下边的错误

  1. arm_max_f32.o attributes are not compatible with the provided cpu and fpu attributes .
  2. Object arm_max_f32.o contains Build Attributes that are incompatible with the CPU attributes.


我使用了一条求浮点数最大值的函数然后就报了下边的错误
  1. arm_max_f32(buf, 50, &maxValue, &maxIndex);
  1. .\Flash\Blinky.axf: Error: L6366E: arm_max_f32.o attributes are not compatible with the provided cpu and fpu attributes .
  2. Object arm_max_f32.o contains Build Attributes that are incompatible with the CPU attributes.
  3.     Tag_VFP_arch = Use of the ARM v8-A FP ISA was permitted, but only citing registers D0-D15, S0-S31 (=8)
  4. .\Flash\Blinky.axf: Error: L6367E: arm_max_f32.o(.rev16_text) attributes are not compatible with the provided cpu and fpu attributes .
  5. Object arm_max_f32.o contains Build Attributes that are incompatible with the CPU attributes.
  6.     Tag_VFP_arch = Use of the ARM v8-A FP ISA was permitted, but only citing registers D0-D15, S0-S31 (=8)
  7. .\Flash\Blinky.axf: Error: L6367E: arm_max_f32.o(.revsh_text) attributes are not compatible with the provided cpu and fpu attributes .
  8. Object arm_max_f32.o contains Build Attributes that are incompatible with the CPU attributes.
  9.     Tag_VFP_arch = Use of the ARM v8-A FP ISA was permitted, but only citing registers D0-D15, S0-S31 (=8)
  10. .\Flash\Blinky.axf: Error: L6367E: arm_max_f32.o(.rrx_text) attributes are not compatible with the provided cpu and fpu attributes .
  11. Object arm_max_f32.o contains Build Attributes that are incompatible with the CPU attributes.
  12.     Tag_VFP_arch = Use of the ARM v8-A FP ISA was permitted, but only citing registers D0-D15, S0-S31 (=8)
  13. .\Flash\Blinky.axf: Error: L6367E: arm_max_f32.o(.text) attributes are not compatible with the provided cpu and fpu attributes .
  14. Object arm_max_f32.o contains Build Attributes that are incompatible with the CPU attributes.
  15.     Tag_VFP_arch = Use of the ARM v8-A FP ISA was permitted, but only citing registers D0-D15, S0-S31 (=8)
  16. Not enough information to list image symbols.
  17. Not enough information to list the image map.
  18. Finished: 12 information, 0 warning and 5 error messages.
最后没有办法了,在Select Software Packs for Target中把ARM::CMSIS的版本从4.5.0改成4.4.0后解决,不知道为什么会出这个问题。
QQ图片20151209155634.png


虾扯蛋,蛋扯虾,虾扯蛋扯虾

回复评论 (3)

虾哥,可以对比下4.4和4.5的arm_math.h的这个文件有啥不同,看看能不能看出些端倪。
我是5.13的版本,现在是4.4和4.3的CMSIS的版本。我用文本比较器,对比了一下,arm_max_f32这个函数好像没什么区别呢。您再看下参数啦。
1.png
点赞  2015-12-10 11:35
引用: huaiqiao 发表于 2015-12-10 11:35
虾哥,可以对比下4.4和4.5的arm_math.h的这个文件有啥不同,看看能不能看出些端倪。
我是5.13的版本,现在 ...

谢谢
我今天又查了一下资料,看到有一个贴子,确定是我的MDK版本5.14不支持CMSIS 4.5.0
http://www.keil.com/forum/60461/

The pack ARM:CMSIS version 4.5.0 is not compatible with the version 5.16a of uVision. You must still continue to use version ARM:CMSIS v4.4.0 till version 5.17 of uVision.
虾扯蛋,蛋扯虾,虾扯蛋扯虾
点赞  2015-12-10 11:44
引用: littleshrimp 发表于 2015-12-10 11:44
谢谢
我今天又查了一下资料,看到有一个贴子,确定是我的MDK版本5.14不支持CMSIS 4.5.0
http://www.kei ...

哦哦,明白了。我说呢。这个您在选择device的时候就可以看得出的。如果没有您的型号,就需要升级库或者软件升级了。
点赞  2015-12-10 12:30
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复