Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   array problems (http://www.chiefdelphi.com/forums/showthread.php?t=42727)

p1r0o2g7 26-01-2006 20:50

array problems
 
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

Re: array problems
 
http://www.chiefdelphi.com/forums/sh...ad.php?t=42714

Or search the forums for "lookup table"

jerry w 27-01-2006 15:43

Re: array problems
 
Quote:

Originally Posted by p1r0o2g7
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


All times are GMT -5. The time now is 01:04.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi