Re: [arm-gnu] Fwd: Doubts regarding compatilbility issues between codesourcery assembler file and RVDS assembler file.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [arm-gnu] Fwd: Doubts regarding compatilbility issues between codesourcery assembler file and RVDS assembler file.
- To: Abhinav Varma <abhinavvarma.13@xxxxxxxxx>
- Subject: Re: [arm-gnu] Fwd: Doubts regarding compatilbility issues between codesourcery assembler file and RVDS assembler file.
- From: Richard Earnshaw <rearnsha@xxxxxxx>
- Date: Thu, 12 Aug 2010 19:05:43 +0100
On Thu, 2010-08-12 at 23:25 +0530, Abhinav Varma wrote:
> Hello Richard,
>
> I am still inexperienced in ARM assembly programming, but when I try
> assembling the Codesourcery (arm-none-eabi-as) compatible .S source
> file, it gives errors. The errors are because the syntax for
> directives are different in both assemblers. As an example arm-as has
> .macro and .endm while armasm has MACRO and MEND respectively. So,
> when I wish to convert the source code, I mean mapping these
> directives so that the code becomes compatible with armasm assembler.
>
My point is that you shouldn't need to do this mapping. Why can't you
continue to use GAS? Although the input to the two assemblers is not
compatible, the output is.
R.
> Thanks and Regards
> Abhinav
>
>
>
>
> On Thu, Aug 12, 2010 at 11:12 PM, Richard Earnshaw <rearnsha@xxxxxxx> wrote:
> >
> > On Thu, 2010-08-12 at 17:42 +0530, Abhinav Varma wrote:
> >> Hey,
> >>
> >> I have a arm assembly source code whichi is compatible with
> >> CodeSourcery's arm-none-eabi-as. I also want to run it on RVCT 4.0
> >> armasm. But I am getting lot of errors as GAS and ARMASM aren't
> >> compatible. Is there any method to convert an assembly code from
> >> CodeSourcery's assembler to RVCT's assembler?
> >>
> >> Initially I was trying the preprocessing on the armcc compiler which
> >> was unable to preprocess #error and the #define function directives.
> >> But then I thought that since they are already supported by
> >> arm-none-eabi-gcc, so lets run the preprocessor on the arm-gcc
> >> compiler. The generated assembly code (remember the file had assembly
> >> code with some C style directives) needs to be converted to arm-asm
> >> style code for which I have started working on mapping the
> >> instructions. I have problems mapping the following (arm-none-eabi-as)
> >> directives. If you have any information about which directives replace
> >> them on arm-asm, it would be very helpful.
> >>
> >> 1) .word
> >> 2) .size myFunc, . -myFunc
> >> 3) .org 0x6a1
> >> 4) .fill 0x100,4,~0x1353A318
> >>
> >> Thanks and Regards
> >> Abhinav
> >
> > Both ARMASM and GAS use the same object file format (governed by the
> > ABI). Is there any reason why you can't continue to use GAS for this
> > file?
> >
> > R.
> >
> >