【整理】crosstool-ng中的Architecture level,Emit assembly for CPU,Tune for CPU对于TQ2440的S3C2440的ARM920T填写何值

摘自【整理】crosstool-ng中的Architecture level,Emit assembly for CPU,Tune for CPU对于TQ2440的S3C2440的ARM920T填写何值

【背景】

折腾:

【记录】Cygwin下为arm920t配置crosstool-ng

期间,需要对于TQ2440的S3C2440的ARM920T,搞清楚Architecture level,Emit assembly for CPU,Tune for CPU分别填写何值。

【折腾过程】

1.参考之前的:

【整理】crosstool中的Architecture level(CT_ARCH_ARCH),Emit assembly for CPU(CT_ARCH_CPU),Tune for CPU(CT_ARCH_TUNE)的值,对于arm的xscale应该是填写什么

去搞清楚,到底参数该怎么写。

2.参考:

3.17.3 ARM Options

用crosstool-ng建立Linux交叉编译环境(以S3C2440(armv4t)为例)

http://infocenter.arm.com/help/topic/com.arm.doc.ddi0151c/ARM920T_TRM1_S.pdf

中的“The ARM920T processor incorporates the ARM9TDMI integer core, which implements the ARM architecture v4T. ”

http://www.bdtic.com/ARM/ARM920T.html

qt4.7.2移植到arm-linux s3c2440全程指导

http://stuff.mit.edu/afs/athena/system/i386_deb50/os-ubuntu-9.04/usr/src/linux-headers-2.6.28-16/arch/arm/Makefile

可知:

此处的S3C2440是ARM920T,用的是ARM9TDMI的核心,对应着arm的armv4架构

针对S3C2440,对应的参数分别是:

(1)Architecture level=CT_ARCH_ARCH=-march=armv4t

(2)Emit assembly for CPU=CT_ARCH_CPU=-mcpu=arm9tdmi

(3)Tune for CPU=CT_ARCH_TUNE=-mtune=arm920t

3.其中,开始还以为是:

-mcpu=arm920t

-mtune=arm9tdmi

呢。

后来才明白:

mcpu,值得是内核用的是什么,此处内核是arm9tdmi,而不是arm920t

即,arm9tdmi的内核,对应着有多种CPU

(参考:http://stuff.mit.edu/afs/athena/system/i386_deb50/os-ubuntu-9.04/usr/src/linux-headers-2.6.28-16/arch/arm/Makefile

比如ARM920T,ARM922T,ARM925T,ARM926T,ARM940T,ARM946E等等。

所以,此处应该是:

-mcpu=所用内核=arm9tdmi=对应产生的汇编代码是哪个内核的(GCC uses this name to determine what kind of instructions it can emit when generating assembly code)

-mtune=具体是哪一款的cpu==arm920t=gcc会(针对产生的硬件的指令)为了该款cpu进行微调(tune)(specifying the actual target processor type, and hence restricting which instructions can be used, it specifies that GCC should tune the performance of the code as if the target were of the type specified in this option, but still choosing the instructions it generates based on the CPU specified by a
-mcpu=

option. For some ARM implementations better performance can be obtained by using this option. )

【总结】

所以,至此渐渐更加清楚了,针对于TQ2440开发板所用的S3C2440:

-march=对应的架构是什么=此处是arm下面的v4t,即armv4t

-mcpu=具体用的什么cpu核心=此处是arm9tdmi的内核

-mtune=具体是哪一款cpu=此处是arm920t    



此刻,又想到,之前给xscale配置这些参数的时候:

【整理】crosstool中的Architecture level(CT_ARCH_ARCH),Emit assembly for CPU(CT_ARCH_CPU),Tune for CPU(CT_ARCH_TUNE)的值,对于arm的xscale应该是填写什么

实际上,针对xscale,mtune应该是参考:

http://stuff.mit.edu/afs/athena/system/i386_deb50/os-ubuntu-9.04/usr/src/linux-headers-2.6.28-16/arch/arm/Makefile

中的strongarm110,即整体配置是:

对于xscale应该是:

(1)Architecture level=CT_ARCH_ARCH=-march=armv5te

(2)Emit assembly for CPU=CT_ARCH_CPU=-mcpu=xscale

(3)Tune for CPU=CT_ARCH_TUNE=-mtune=strongarm110

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值