[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] lwIP example for Luminary Micro LM39B90 MCU - debug help
From: |
Tn |
Subject: |
[lwip-users] lwIP example for Luminary Micro LM39B90 MCU - debug help |
Date: |
Fri, 22 Apr 2011 19:33:42 +0200 |
User-agent: |
KMail/1.13.5 (Linux/2.6.32-5-686; KDE/4.4.5; i686; ; ) |
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] lwIP example for Luminary Micro LM39B90 MCU - debug help,
Tn <=