MPLAB IDE C18 Help!

Discussion in 'Embedded Systems and Microcontrollers' started by bilal sheikh, Mar 8, 2015.

  1. bilal sheikh

    Thread Starter New Member

    Jan 21, 2015
    22
    0
    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
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    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?
     
    bilal sheikh likes this.
  3. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,377
    494
    Did you put first look up table at line 20?
     
    bilal sheikh likes this.
  4. bilal sheikh

    Thread Starter New Member

    Jan 21, 2015
    22
    0
    yes sir, table is at line 20, if there is one table, there is no error, if there are two, there is error.
     
  5. bilal sheikh

    Thread Starter New Member

    Jan 21, 2015
    22
    0
    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 :)
     
  6. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    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.
     
    bilal sheikh likes this.
  7. paulfjujo

    New Member

    Mar 6, 2014
    20
    3
    hello,

    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
     
    bilal sheikh likes this.
Loading...