cancel
Showing results for 
Search instead for 
Did you mean: 

overlap local variables with stack area

seecure
Associate II
Posted on April 17, 2004 at 18:08

overlap local variables with stack area

12 REPLIES 12
sjo
Associate II
Posted on April 16, 2004 at 07:38

The actual values for the stack etc look ok to me in the attached doc, unless I have missed something !

As your program is approx 40k I would recommend using -mods memory model (libis.st7 lib), then you can remove the shared memory section.

Regards

sjo
luca239955_st
Associate III
Posted on April 16, 2004 at 11:52

Datz,

a colleague suggested the problem is probably in the declaration in your first post

int *tx_buff=(UINT16 *)&dest;

that should probably be

int *tx_buff=(UINT16 *)dest;

With the extra ''&'' in your decalaration you take the address of dest instead of its value and then tx_buff points in the middle of the stack which leads to crashes.

Let me know if it works.

Regards,

Luca

[ This message was edited by: _luca on 16-04-2004 15:23 ]
seecure
Associate II
Posted on April 17, 2004 at 18:08

Hi luca,

if you see the attached document you will see an anather example and the problem still exist.

my conclusions are:

since I have about 40K code,using about 2K RAM the only model witch is now work successfully is the (+modml) memory long as jatin recomended.

+mods is faild because the RAM size.

+modsl is faild in run-time bacuse the overlap.(cannot be used for any application).

atz