[Top][All Lists]

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

[avr-gcc-list] Please help with "section .bss is not within region data"

From: Molnar Zoltan
Subject: [avr-gcc-list] Please help with "section .bss is not within region data" error
Date: Tue, 24 Apr 2001 05:36:12 -0700 (PDT)

I'm wondering if anybody has seen this problem: 
I have the following type declaration: 
#define FIFOlgth 2048 
typedef struct {
u16 min,max,o,f;
bool isfull; 
u08 data[FIFOlgth];
} t_fifo; 
The problem is if I want to declare a global variable like this: 
t_fifo fifo; 
int main (void)

The make process returns with error (I enclose the compile/link flags too):

avr-gcc -c -g -O2 -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst -mmcu=at90s8515 
-I. test.c -o test.o
avr-gcc test.o -Wl,-Map=test.map,--cref -mmcu=at90s8515 -o test.elf
D:\AVRGCC\BIN\..\lib\gcc-lib\avr\2.95.2\..\..\..\..\avr\bin\ld.exe: address 
0x869 of test.elf section .bss is not within region data
make: *** [test.elf] Error 1 
If I put the declaration in the main function like this: 
int main (void)
t_fifo fifo;
it compiles OK. 
I need the variable to be global, I have to access it from interrupts. 
How can I initialize the stack pointer and MCUCR at compile time?
I have read something about --defsym but I don't know where to put and how. In 
the compiler flags or the linker flags?
What's the syntax using --defsym 
Any help would be welcomed
PS: I'm using avr-gcc 2.95, but I tryed with 2.97, 3.1 with the same result.

Are you a Techie? Get Your Free Tech Email Address Now! Visit 

reply via email to

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