|Subject:||[avr-gcc-list] introducing a new section in data memory|
|Date:||Thu, 19 Feb 2009 21:16:46 -0800 (PST)|
I sent a mail on the subject but it seems to have got lost and therefore posting again
I need to have a buffer of about 256 bytes starting at a page boundary in the ram of Mega8. To get this I introduced a new section and assigned it an address in makefile. I defined variables, to test, using attribute section. However when I try to debug the code I see the variables are allotted memory locations other than specified in the section?
My makefile has the following statement
LDFLAGs = -wl,--section-start=.test=0x800100
My .C file has the following statements
unsigned char mem3 __attribute__ ((section(".test")));
int mem5 __attribute__ ((section(".test")));
I have also noticed, if I declare a global variable I get overlap error. Please help me solve this problem. Thank you.
|[Prev in Thread]||Current Thread||[Next in Thread]|