cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1

Anonymous
Not applicable

 Is there any idicator bit of Stack overflow in PSoC3. Seems like the program execution is random on attach to running target.

0 Likes
5 Replies
ETRO_SSN583
Esteemed Contributor

This might tangentially be of some help -

   

 

   

      http://www.cypress.com/?docID=34362

   

 

   

Regards, Dana.

0 Likes
Bob_Marlowe
Expert II

Busting the stack on a 8051 core as in a PSoC3 is an easy thing because it is so small. You can pre-load the stack with some defined values at start of main() and check after some time of running with the debugger if the stack is approaching to its limit.

   

Have a look at any warnings and take care when using pointers to functions which may lead to errors in PSoC3 environment when not explicitely cared for, they may produce random errors.

   

Keep an eye on heap usage as well.

   

 

   

Bob

0 Likes
Bob_Marlowe
Expert II

In Creator you can set a watchpoint at the top of stack which will interrupt your program when that location is accessed.

   

 

   

Bob

0 Likes
ETRO_SSN583
Esteemed Contributor

A couple of interesting references -

   

 

   

http://www.keil.com/support/docs/192.htm

   

 

   

http://www.keil.com/forum/7226/

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

But where this small stack is?

   

Is it here:

   

?STACK          SEGMENT   IDATA

                RSEG    ?STACK

   

or here:

   

XBPSTACK        EQU     1
XBPSTACKTOP     EQU     CYDEV_SRAM_SIZE - 3 ;Keep in mind additional variables declared above

   

all is taken from KeilStart.a51

0 Likes