- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there any idicator bit of Stack overflow in PSoC3. Seems like the program execution is random on attach to running target.
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In Creator you can set a watchpoint at the top of stack which will interrupt your program when that location is accessed.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A couple of interesting references -
http://www.keil.com/support/docs/192.htm
http://www.keil.com/forum/7226/
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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