> It could be something very basic like stack overflow. Yes I agree, but what stacks are you thinking of?
I have thought the same thing many times. I tried changing the FreeRTOS heap size up and down, but it had no effect. I tried changing the heap size left in the RAM also, but it had no effect. I also tried changing the mem pool sizes in lwipopts.h. There were times with that when I would get 'out of pcb memory' or 'pool memory' etc. dumped out into my console (UART) and those effects were readily apparent. But most of the crashes or weird problems never show any outright memory msgs. It's still hiding somewhere. > - Try to isolate a usage pattern that leads to the bug reliably, so > that you can repeat it many times. Got that, TCP dies after 2 HTTP page refreshes. Yet code keeps running. > - Set breakpoints in the code as close to the crash as possible. Start > off with breakpoints in working code .... Well, the code all works a few times, and then it stops working after repeated calls. I'm with you, I've been doing breakpoint traces all over the place. The problem is it's extremely time consuming!!!! So much of the code works all the time, I spend loads of time single stepping with nothing ever going wrong. I use Signum Systems JetJTAG and Chameleon debugger. I can set 2 hardware breakpoints, variable watches, you name it.... I do that on various routines trying to see where it is crashing at. But one of the things that make this code difficult is the timing aspect. When I break, the timers are expiring. This changes the behavior of the code vs. free running. Hmmm, perhaps I should try disabling the lwIP timers. > it should be easy to find the reason by looking at variables > and memory contents. Easy Yeah, that's what I would think too! I've been doing embedded for 25 years, and this Ethernet stuff is the hardest to debug I've ever seen. Anyone who fights through getting this lwIP working should be given an honorary PhD. You've inspired me. I'll have to grit my teeth and chase the bugs further. Thank you for your post! Chris. _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
