Hi
I know you're supposed to post code, but I have a situation which happens only when the Teensy is more than 80% full, and that's a lot of code...
So I'm really looking for pointers as to how to investigate.
I have this big program, and have been merrily adding code for a few months. The application compiles successfully, but then hangs after a seemingly random time. The new code is not called under normal circumstances (it handles an inbound message, which arrives only very infrequently). I have extensive logging and I can determine when it stops, and it's different every time.
If I remove this new code, the system works indefinitely.
If I include this new code and remove about 200 lines of older code, the new code works fine and the system works indefinitely. (The older code I removed was also not used, being dependent on a selectable option.)
I have used RamMonitor to examine the heap and stack size as well as free memory. It's about 2kb/3kb/17kb. Total memory used is 63%.
Is there anything else anyone could suggest? Is there some compiler limitation on size? Or numbers of variables? I noticed by examining the .elf that one boolean variable took up 4 bytes, and another 2 bytes which struck me as odd.
Thanks in advance
David
I know you're supposed to post code, but I have a situation which happens only when the Teensy is more than 80% full, and that's a lot of code...
So I'm really looking for pointers as to how to investigate.
I have this big program, and have been merrily adding code for a few months. The application compiles successfully, but then hangs after a seemingly random time. The new code is not called under normal circumstances (it handles an inbound message, which arrives only very infrequently). I have extensive logging and I can determine when it stops, and it's different every time.
If I remove this new code, the system works indefinitely.
If I include this new code and remove about 200 lines of older code, the new code works fine and the system works indefinitely. (The older code I removed was also not used, being dependent on a selectable option.)
I have used RamMonitor to examine the heap and stack size as well as free memory. It's about 2kb/3kb/17kb. Total memory used is 63%.
Is there anything else anyone could suggest? Is there some compiler limitation on size? Or numbers of variables? I noticed by examining the .elf that one boolean variable took up 4 bytes, and another 2 bytes which struck me as odd.
Thanks in advance
David