Can you send your code for (2) to the list?

Repeatedly rebooting usually means that you are overwriting the stack  
so the return address is zero (the reset vector). Besides stack  
corruption, this can also happen if you are doing a huge buffer  
overrun in the .data or .bss, as the RAM is so small.

Phil

On Oct 15, 2009, at 10:04 PM, Yee Wei Law wrote:

> Dear all,
>
> This is a generic question, but I have to ask out of desperation. I
> have a sizeable TinyOS program (>40 KB, doesn't fit on TelosB), which
> keeps crashing and reseting itself on IRIS. Without a JTAG ICE, I am
> relying on printf for debugging.
>
> (1) I am not using any dynamic memory allocation;
> (2) I am using a global variable as a message buffer so as not to
> repeat the mistake in the thread "Mote crashes when sending"
> (http://www.mail-archive.com/[email protected]/ 
> msg29099.html);
> (3) I am not using any recursive function;
> (4) I have also read Levis and Gay's "TinyOS Programming" to watch out
> for potential pitfalls..
>
> ..in vain. I wonder if anybody can suggest an effective way to debug
> this kind of problem?
>
> Thanks in advance.
>
> Regards,
> Yee Wei
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos- 
> help

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to