Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Error [1300] stack frame too large

Status
Not open for further replies.

lopex

Junior Member level 1
Junior Member level 1
Joined
Jan 16, 2008
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,399
stack frame too large

Hi,

I believe that this matter has already been spoken.
I want a big vector unsigned char [50][10]={{0,1,2},{0,2,6}};
This vector is constant.

This is for PIC18F4520, C18

Thanks,

lopex
 

error [1300] stack frame too large

Hi,
Your vector is not define like constant.
Which compiler?
 

    lopex

    Points: 2
    Helpful Answer Positive Rating
[1300] stack frame too large

You didn't say how you were declaring this, or if you intended it to be a constant or not. However, the Stack error would indicate you declared it as a local function variable (not constant). To fix that problem add the 'overlay' keyword to your declaration:
Code:
    overlay unsigned char big_vector[50][10]={{0,1,2},{0,2,6}};
 

    lopex

    Points: 2
    Helpful Answer Positive Rating
stack frame too large c18

If its constant, it should be:
Code:
rom unsigned char [50][10]={{0,1,2},{0,2,6}};

or
Code:
unsigned rom char [50][10]={{0,1,2},{0,2,6}};

sorry I'm not at work to check it correctly...

char [50][10] are 500 bytes, and in a PIC18 all ram banks are 256 bytes... so if you want that vector in ram you must "fuse" to banks (with the linker script and the #pragma data) there are lots of examples ot doing that...
 

    lopex

    Points: 2
    Helpful Answer Positive Rating
c18 stack frame too large

Thanks,
With a
Code:
#pragma romdata bigvector
and
Code:
rom unsigned char vector [50][10];
I made it resolve the problem.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top