[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] lwIP example for Luminary Micro LM39B90 MCU - debug hel
From: |
Martin Velek |
Subject: |
Re: [lwip-users] lwIP example for Luminary Micro LM39B90 MCU - debug help |
Date: |
Mon, 25 Apr 2011 13:21:39 +0200 |
Hi,
> FreeRTOS (very popular platform) for newbies to easily start developing
> using netconn api.
What kind of FreeRTOS - Luminary(TI) porting example are you using?
> spaces, etc), MCU crashes in tcpip_thread. I tried to double, triple,
Could you more explain "crashes in tcpip_thread."? Does your MCU end
inside data abort, undefined instruction or some other interrupt? Or
the tcpip_thread begins to listen and never wakes-up?
> I use tcpip_thread, ethernet interrupt thread woken up from ISR to
> call stellarisif_interrupt() pushing data into the stack. Ethernet
> ISR priority is set to configMAX_SYSCALL_INTERRUPT_PRIORITY
> (issue specific for Cortex-M3).
You should redesign your code. You should never do a time-consuming
action inside an ISR. Could you create a task to push data into the
stack that is activated by a semaphore from the ISR?
> I'll provide full code for request.
Are you able to debug the LWIPstack? You have do define a debug
function. The LWIP has a great debug capability. I would recommend to
use it.
Can you send your FreeRTOS ethernet driver + LWIP adaptation layer?
Regards
Martin
On 22 April 2011 19:33, Tn <address@hidden> wrote:
> Hello everyone,
>
> Being a bit displeased by very hairy official lwIP demo for Luminary
> Micro LM3S9B90, I decided to create a template project for lwIP on
> FreeRTOS (very popular platform) for newbies to easily start developing
> using netconn api.
>
> I almost got it working, but I can't remove a very annoyng bug. I can
> start only ~150-250 connections during program runtime.
>
> I use tcpip_thread, ethernet interrupt thread woken up from ISR to
> call stellarisif_interrupt() pushing data into the stack. Ethernet
> ISR priority is set to configMAX_SYSCALL_INTERRUPT_PRIORITY
> (issue specific for Cortex-M3).
>
> The "application task" is simple:
>
> while(1) {
> UARTprintf("Listening... ");
> connClient = netconn_accept(connList);
> if( connClient != NULL ) {
> UARTprintf("accepted\n");
> netconn_delete(connClient);
> UARTprintf("deleted\n");
> } else {
> UARTprintf("invalid!\n");
> }
> }
>
> After 150-250 iterations (depending on compiled options, stack
> spaces, etc), MCU crashes in tcpip_thread. I tried to double, triple,
> quadruple stack space, but to no effect. This is 100% reproductible,
> it crashes always the same way (ex. after 165 iterations). Exact
> iteration depends on compile options.
>
> I search for more experienced developer to help me debug this.
> Entire project code will be donated for lwIP project for everyone to
> benefit. I've seen that many people search for a complete, clean, and
> easy to analyze example for lwIP under FreeRTOS.
>
> I'll provide full code for request.
>
> Thanks,
> TN
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users
>