avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] C and AS programs - compiled together


From: Ned Konz
Subject: Re: [avr-gcc-list] C and AS programs - compiled together
Date: Fri, 16 Mar 2007 19:44:26 -0700
User-agent: Thunderbird 1.5.0.10 (Macintosh/20070221)

Grzegorz !Kubik wrote:
 >> I would like to align 256B buffer at the RAM address 0xXX00 - to use
 >> 8-bit buffer pointers.
 >
 > Well, IMHO there's an .align pseudo-op.  This is potentially wasting
 > up to 255 bytes of RAM then.
 >
Agree. But my task is to reuse existing assembler program (that has 8-bit pointers for simplicity and speed), so waisting some RAM is acceptable.

How are you getting 8-bit pointers to work in avr-gcc?

.align is from assembler side. C declarations look more convenient for me. But I found in:
http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Attribute-Syntax.html#Attribute-Syntax
that: "...for example, the usage of `aligned' and `noreturn' attributes given above is not yet supported"
What is and what is not supported?
Anyway, reading linker manual may be necessary ;-(
I would prefer simple example of aligning 256B buffer to 0xXX00 address in RAM...

The linker manual is not large.

It's probably easiest to define a section starting on the appropriate boundary (using a custom linker file), and then tell the compiler to put the buffer into that section.

--
Ned Konz
address@hidden
http://bike-nomad.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]