Stack Size on MCF52233

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Stack Size on MCF52233

2,429 Views
rsk2
Contributor I
Hello,

Can someone tell me how I can increase the stack size on the MCF52233? I am having trouble finding which file it is set in.

Thank you,
Randy
Labels (1)
0 Kudos
Reply
5 Replies

1,001 Views
CrasyCat
Specialist III
Hello
 
I assume you are using CodeWarrior for Coldfire V6.3.
Am I right?
If this is the case, the stack size is specified in the .lcf file.
 
You can find following command there:
     ___SP_SIZE      = 0x800;
This is the actual stack size.
 
CrasyCat
0 Kudos
Reply

1,001 Views
FWFan
Contributor III

Hi CrasyCat,

 

If I increase my stack size, do I also need to alter my userram memory in the .lcf file?

 

MEMORY {
   vectorram   (RWX) : ORIGIN = 0x20000000, LENGTH = 0x00000500
   code        (RX)  : ORIGIN = 0x20000500, LENGTH = 0x00004B00
   userram     (RWX) : ORIGIN = 0x20005000, LENGTH = 0x00002000
}

 

Thank you,

FWFan

0 Kudos
Reply

1,001 Views
scifi
Senior Contributor I

Hi FWFan,

 

Is there a reason why only 8K bytes out of 32K bytes of RAM available are actually used for userrram? My guess is that the line should read

 

 userram     (RWX) : ORIGIN = 0x20000500, LENGTH = 0x00007B00

0 Kudos
Reply

1,001 Views
FWFan
Contributor III

Hi scifi,

 

This is what generated when I created my project.  It was actually 0x00001800.  I changed it to 0x0000200A.  But this only works if I keep my array to 254 elements, if I change it to 255 or more, the program will freeze.  My array index is int so it should be able to go beyond 255.  I've included the lcf file if you like to take a look.  I tried to change the stack size but this doesn't help neither.  I need to learn how to increase the ram size correctly.

 

My demo board is the MCF52259, I think I should have up to 64KBytes of SRAM. 

 

Thank you for your help.

FWFan

0 Kudos
Reply

1,001 Views
rsk2
Contributor I
Thanks! this works for me.
0 Kudos
Reply