新蒲京娱乐场官网-www.8555cc.com|最新网站NO.1-2

新蒲京娱乐场官网8555cc最新网站提醒您:您的浏览器版本过低或者使用了兼容模式,为了获得更好的浏览体验,建议使用IE10以上的浏览器或使用极速模式。 请升级浏览器以获得更好的体验!

新蒲京娱乐场官网-www.8555cc.com|最新网站NO.1-2

技术文章 > ARM软件工具 > ARM DS-5 > DS-5编译自带例程threads选项改为-march=armv7-a出错

DS-5编译自带例程threads选项改为-march=armv7-a出错

文章来源:新蒲京娱乐场官网8555cc最新网站 发布日期:2021.1.19 浏览次数:4521
DS-5自带例程 examples/Linux_examples.zip 中的 threads 例程默认使用的目标内核是:armv4t,对于新的ARM内核来说,一般都是Cortex-A系列的,他们基本上都是armv7-a架构,所以这个配置就有点老了。

而如果在 DS-5 中直接把 armv4t 改成 armv7-a,又会提示 error: threads uses VFP register arguments 这样的错误:

01
02
03
04
05
06
07
08
09
10
11
12
13
15:47:33 **** Build of configuration Default for project threads ****
make -f Makeboth all
make[1]: Entering directory `D:/Saves/DS-5/threads'
arm-linux-gnueabihf-gcc -c -g -O0 -fno-omit-frame-pointer -marm -march=armv7-a -mfloat-abi=soft  -pthread threads.c -o threads.o
arm-linux-gnueabihf-gcc threads.o -marm -march=armv7-a -mfloat-abi=soft  -pthread -o threads
d:/program files/ds-5 v5.21.0/sw/gcc/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld.exe: error: threads uses VFP register arguments, threads.o does not
d:/program files/ds-5 v5.21.0/sw/gcc/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld.exe: failed to merge target specific data of file threads.o
collect2.exe: error: ld returned 1 exit status
make[1]: *** [threads] Error 1
make[1]: Leaving directory `D:/Saves/DS-5/threads'
make: *** [all] Error 2
 
15:47:34 Build Finished (took 673ms)


那么该怎么解决呢?
从错误提示中新蒲京娱乐场官网看出了点原因,其实只要再把
1
-mfloat-abi=soft

改为:
1
-mfpu=vfp

就可以了。
GNU GCC的参数请参考:https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html


本文来自新蒲京娱乐场官网8555cc最新网站,原文地址: http://www.myir-tech.com/customerService/resource-list.asp?id=592,转载请注明出处。