cstrahm wrote on Sunday, December 21, 2008:
I’m using lwIP 1.3 and GCC.
- I looked at your AT91SAM7 demo and your FreeRTOSconfig is pretty much about the same. None of the params look that much different.
- Does lwIP allocate RAM within the configTOTAL_HEAP_SIZE, or does it need it’s own RAM outside FreeRTOS for memp, pbufs, etc. ?
- The org configTOTAL_HEAP_SIZE = 24K. When I set to 12K app won’t run at all, going up by 2K inc to 32K compiler refuses says RAM is full. No matter what the setting, overflow of your stack remains.
- I am also using the ping.c/ping.h file addon with lwIP, and often see the “ping-thread” is the task that is overflow’d in vApplicationStackOverflowHook(). Do I need more threads or something else for this addon? I really don’t see why the simple ping code would change much.
- I found a printf-stdarg.c in the AVR32 demo. I guess it will work for this ARM7. It compiles. When I don’t have it in the makefile, the map file shows ‘sprintf’ as coming from the usual libg.a . When I add printf-stdarg.c to my makefile, the map file only shows ‘sprintf’ as in printf-stdarg.o . So I think that is right, but I still get your stack overflow the same. Do I need to do something else?
Still no progress, Chris.
- In the lwIPopts.h file the settings are:
#define lwipBASIC_SERVER_STACK_SIZE 250
#define TCPIP_THREAD_NAME "lwIP"
#define TCPIP_THREAD_STACKSIZE 600
#define TCPIP_THREAD_PRIO 3
#define DEFAULT_THREAD_STACKSIZE 200
#define DEFAULT_THREAD_PRIO 1
#define LWIP_DEBUG 1
#define DBG_TYPES_ON 0xff
#define MEM_SIZE 2000
#define MEMP_NUM_PBUF 20
#define PBUF_POOL_SIZE 4
#define PBUF_POOL_BUFSIZE 1500
- In the FreeRTOSconfig.h file the settings are:
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 72000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 128 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24 * 1024 ) )
#define configMAX_TASK_NAME_LEN ( 16 )
#define configUSE_TRACE_FACILITY 1
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1
#define configUSE_MUTEXES 1