I am using FreeRTOS v4.1.3 + lwip 1.2.0 + Rowley CrossWorks.
Upon further investigation, it actually seems to be a stack overflow, which is
the root for my problem.
I have increased the value for lwipTCP_STACK_SIZE from 600 to 800,
and now the application has run straight for over an hour.
I read up on the undef exception handling in the ARM archtecture reference manual.
Which says that the instruction pointed to by LR is the instruction after the instruction that caused
the exception.
I thought as per the Atmel datasheet that the failing address would be present in the MC_AASR,
but the value in LR - offset, doesn't match the value in MC_AASR.
The LR register point to an instruction, where we enter the tcp_input function.
Where the values for pbuf pointer and netif pointer is initialized.
While writing this mail, another undef exception occured :(
here is the callstack:
tcp_next_iss()
tcp_input()
undef_handler()
if i look closer at where the execution of each the above functions ended i get this result:
hope someone can help my out here, since i might be on the wrong track.
And if anyone has some insights into what the MC_AASR really represents, let me know.
ty all for your help so far.
regards,
Martin
> Date: Wed, 14 Feb 2007 15:47:32 +0200 > From: address@hidden > To: address@hidden > Subject: Re: [lwip-users] lwip + sam7x = udef exception > > B B wrote: > > > > Hi again, > > > > correction to the below, the address calculated > > is resulting in a 2 byte aligned value and not 4 byte as required. > > > > (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4) = 0x0020b1fa > > How about compiling all your source code into ARM mode and trying to > re-generate the problem? Maybe it can > give a clue. Moreover "adds r4,r4,#00" doesn't look like it can generate > a data abort. Maybe pipelening can be affecting > PC value. A whole code segment dissassembly can give more detailed info > about the error. > > By the way, you didn't mention about your environment. OS,compiler? > > I use SAM7X+LWIP+FREERTOS combination with GCC compiler and I'm quite > happy with it. > > > _______________________________________________ > lwip-users mailing list > address@hidden > http://lists.nongnu.org/mailman/listinfo/lwip-users