[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Align Data and RAM Gaps
From: |
Thomas D. Dean |
Subject: |
[avr-gcc-list] Align Data and RAM Gaps |
Date: |
Fri, 08 Aug 2014 12:43:25 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
I have a combined C and AS application. I have to use AS because of the
time restraints.
I have a 256 byte buffer that is accessed with two pointers, head and tail.
In the AS code, I want to only save the low order byte of the pointer.
This is do-able, if the buffer is aligned at 0x0100.
In the C file,
char buf[256] __attribute__ ((aligned (256)));
In the AS file,
.global buf
Looking at the map file, I see
0x0000000000800100 tx_buf_head_ptr
0x0000000000800200 buf
0x0000000000800300 rx_buf_tail_ptr
0x0000000000800302 tx_buf_tail_ptr
There is a gap of 254 bytes.
How do I avoid this gap? What determines the linker allocation order?
Tom Dean
- [avr-gcc-list] Align Data and RAM Gaps,
Thomas D. Dean <=