[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Align Data and RAM Gaps
From: |
Thomas D. Dean |
Subject: |
Re: [avr-gcc-list] Align Data and RAM Gaps |
Date: |
Sat, 09 Aug 2014 04:18:42 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 08/09/14 01:18, Erik Christiansen wrote:
Thanks for the reply. Interesting.
I think the solution I will use is to put the buffer between __bss_end
and the stack.
Initializing in C:
extern unsigned int __bss_end;
...
buffer_base = (uint8_t *)(__bss_end & 0xff80) + 0x80
buf_head_ptr = spi_buffer_base
buf_tail_ptr = spi_buffer_base
etc.
I have a gap, but, it is on the order of 20 bytes.
The order of allocation of variables by ld is curious. The ldscripts
give order to the sections. Moving variable declarations around seems
to have little or no effect on the order I see from avr-nm.
Tom Dean