[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Common symbol definitions for assembler
From: |
Erik Christiansen |
Subject: |
Re: [avr-gcc-list] Common symbol definitions for assembler |
Date: |
Wed, 6 Aug 2003 17:15:08 +1000 |
User-agent: |
Mutt/1.3.28i |
On Wed, Aug 06, 2003 at 08:20:41AM +0200, Artur Lipowski wrote:
> What use group I don't know but I and many people (eg. in avr-libc) prefer
> to use "avr-gcc -x assembler-with-cpp" instead of avr-as.
> This give you full potential (and problems) of the C preprocessor.
> Additionally you not need to have separate includes (headers) for C and
> assembler.
Thank you, Artur. (I've just finished working on a PowerPC project
that had replicate C and assembler "headers". It was a nuisance.)
While awaiting a reply, I found in the gas info:
>>>
You can use the GNU C compiler driver to get other "CPP" style
preprocessing, by giving the input file a `.S' suffix.
<<<
However, changing test.s to test.S, and adding:
#define SPH 0x3E
still gave:
test.S:69: Error: constant value required
with line 69 being:
out SPH,r16 ;RAM is bigger than 256 Bytes.
This seems to clearly show that no macro substitution was made.
So your method has two advantages: It works, and it doesn't require a
funny filename suffix.
Regards,
Erik