knowledge-database (beta)

Current group: comp.sys.arm

Invoking the C preprocessor from Assembler

Invoking the C preprocessor from Assembler  
Saurav Malla
 Re: Invoking the C preprocessor from Assembler  
Joe
From:Saurav Malla
Subject:Invoking the C preprocessor from Assembler
Date:8 Jan 2005 05:45:39 -0800
Hi All,

I am really in a fix. My project has got stucked mid way. Please help
me out of it.

I am trying to compile a assembly file in Code Warrior IDE. The
assembly file contains some C preprocessor macros like #include,
#ifdef and so on.

I understand that for compiling this file first the C preprocessor
needs to preprocess this file before using armasm to assemble it.
The equevalent commands are
armcpp -E sourcefile.s > preprocessedfile.s (C preprocessor
processes it)
armasm preprocessedfile.s (armasm assembles it)

But can any one tell me how can it be done with the help of the Code
Warrior IDE.

I will be very thankful
From:Joe
Subject:Re: Invoking the C preprocessor from Assembler
Date:Sat, 08 Jan 2005 21:14:05 +0000
Saurav Malla wrote:
> Hi All,
>
> I am really in a fix. My project has got stucked mid way. Please help
> me out of it.
>
> I am trying to compile a assembly file in Code Warrior IDE. The
> assembly file contains some C preprocessor macros like #include,
> #ifdef and so on.
>
> I understand that for compiling this file first the C preprocessor
> needs to preprocess this file before using armasm to assemble it.
> The equevalent commands are
> armcpp -E sourcefile.s > preprocessedfile.s (C preprocessor
> processes it)
> armasm preprocessedfile.s (armasm assembles it)
>
> But can any one tell me how can it be done with the help of the Code
> Warrior IDE.
>
> I will be very thankful

Not sure if it will be difficult to change your files, but
in armasm you could have used
IF :DEF: SOMETHING
...
ELSE
...
ENDIF

Joe
   

Copyright © 2006 knowledge-database   -   All rights reserved