分享

ADS ARM的map和field到GNU ARM的转换

 phoenixcyan 2013-04-20
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] Help needed for the ARM Directives 'FIELD' and 'MAP'


  • To: Vikash Saraogi <vikas.saraogi@xxxxxxxxxx>
  • Subject: Re: [arm-gnu] Help needed for the ARM Directives 'FIELD' and 'MAP'
  • From: Carlos O'Donell <carlos@xxxxxxxxxxxxxxxx>
  • Date: Mon, 30 Jan 2006 12:18:58 -0500

On Mon, Jan 30, 2006 at 05:01:44PM +0530, Vikash Saraogi wrote:
>    I'm using the ADS toolchain for my ARM9E implementation
>    and where I've made use of 'FIELD' and 'MAP' directives
>    to describe structures.
> 
>    Can you please let me know the equivalent directives/usage
>    if I'm compiling my application using arm-linux-gcc.
> 
>    Example:
>                                    MAP 0
>    pStrtVOLParams:         FIELD 2*4
>    ubRefBufferIndex:               FIELD 2*1
> 

Thank you for your interest in our Sourcery G++ Toolchains!
The MAP and FIELD directives are not directly available when using
arm-linux-gcc. The toolchain uses GAS for the assembly phase and
it supports different directives.

Your example would have to use the ".equ" directives in GAS, so it 
becomes something like this:

	.equiv startstruct1		0
	.equiv pStrtVOLParams,		startstruct1+0
	.equiv ubRefBufferIndex,	startstruct1+8
	.equiv endstruct1,		startstruct1+10

There is no MAP counter, but it could be emulated with a macro.
I recommend you read the definition of the following GAS directives:
	= .equ
	= .equiv
	= .set
	= .import / .export
http://www./software/binutils/manual/gas-2.9.1/html_mono/as.html#SEC87

I have not tested the above, but it should work for your purposes.
There is no support for register relative maps, though this should be
possible with macros.

Cheers,
Carlos.
-- 
Carlos O'Donell
CodeSourcery
carlos@xxxxxxxxxxxxxxxx
(650) 331-3385 x716

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多