MPLAB IDE C18 Help!

Thread Starter

bilal sheikh

Joined Jan 21, 2015
22
hello, i am using pic18f4431 for my project and have defined 2 look up tables each of 64 decimal values in the program. when i compile the program, following error occurs, can anyone help ?? i need help urgently.
thanks in anticipation.
Screenshot (32).png
 

ErnieM

Joined Apr 24, 2011
8,415
Error 1300: stack frame too large
The size of the stack frame has exceeded the maximum addressable size. Commonly caused by too many local variables allocated as 'auto' storage class in a single function.

Got any huge local variables in modified.c?
 

Thread Starter

bilal sheikh

Joined Jan 21, 2015
22
Error 1300: stack frame too large
The size of the stack frame has exceeded the maximum addressable size. Commonly caused by too many local variables allocated as 'auto' storage class in a single function.

Got any huge local variables in modified.c?
no sir, its only a 40 line code with 5 variables and two look up tables each having 64 values. and sorry i cant understand what is meant by 'auto' storage? what i think is that you are talking about static and dynamic memory concepts . kindly explain :)
 

ErnieM

Joined Apr 24, 2011
8,415
In this case auto variables are being stored on the stack, and you don't have room for 2 structures. The entire stack is only 256 elements.

Try making them global so they get off the stack.

Actually showing this routine may help someone see a problem.
 

paulfjujo

Joined Mar 6, 2014
23
hello,

..i have defined 2 look up tables each of 64 decimal values in the program.
decimal values => type of variable integer , long, float ?

with C18 MPLAB
you can modify your linker file *.lkr
to collapse more than one bank of memory as a big AREA
and then declare your loockup table with this new data name pointer.

example for 4 buffer of 512 bytes
 

Attachments

Top