Log in

View Full Version : array problems


p1r0o2g7
26-01-2006, 20:50
Our team decided on using a lookup table to determine our cannons angle to accurately fire it at the target. I put the array into a function, lets say its called Find_Angle() just for reference. When compiled it gave me the error "Stack Frame too Large".

I searched on Google and found that declaring the array as a global variable would fix that problem but now the compiler is tell me...

"Error - section '.idata_tracking.o' can not fit the section. Section '.idata_tracking.o' length=0x00000524"

Anyone know why? I'm baffled. :confused:

devicenull
26-01-2006, 21:52
http://www.chiefdelphi.com/forums/showthread.php?t=42714

Or search the forums for "lookup table"

jerry w
27-01-2006, 15:43
Our team decided on using a lookup table to determine our cannons angle to accurately fire it at the target. I put the array into a function, lets say its called Find_Angle() just for reference. When compiled it gave me the error "Stack Frame too Large".

I searched on Google and found that declaring the array as a global variable would fix that problem but now the compiler is tell me...

"Error - section '.idata_tracking.o' can not fit the section. Section '.idata_tracking.o' length=0x00000524"

Anyone know why? I'm baffled. :confused:

you are placing the array into ram memory. since it is in a function, the memory is also assigned to the stack. there are less than 256 stack bytes available.
if you intended the array to be in program memory, use the ROM prefix. if it is to be in ram, use the STATIC prefix.
static, tells the compiler not to store the data into the stack.

jerry w