2012-12-08 11:47 AM
Hi all.
I have never really been the RTOS guy but I have decided to give it a try now, especially because of the need of a proper IP stack with Socket integration.
So I decided to try and implement the lwIP stack with the CoOS system on my STM32-E407 from Olimex, that contains an STM32F407ZGT6.
As CoOS has not been ported to the STM32F4 devices yet I used the project found in this post as the ground structure:
http://www.coocox.org/forum/topic.php?id=1549
I then added the lwIP v.1.3.1 stack found in the CoOS+lwIP example for the LPC1766 processor.
I then finally added the required HAL drivers (ethernetif.c etc.) found in the original FreeRTOS+lwIP by ST, and then changed to match the board.
Then when I try to run the project I can sucessfully start the lwIP stack and do its' ARP requests and receipts.
But when I first connect to the board and it is about to make a response all the ''pbuf's'' is filled up and I get these errors:
pbuf_alloc(length=60)
pbuf_alloc: allocated pbuf f_free: deallocating KT
pbuf_alloc(length=60) == f f_free: deallocating KT
memp_malloc: out of memory in pool TCPIP_MSG_INPKT
pbuf_free( TCPIP_MSG_INPKT
pbuf_free: deallocating KT
The complete debugging output can be found in this text file:
http://www.tkjelectronics.dk/uploads/lwip-debugging-output.txt
The CoIDE project for the board can be downloaded here:
http://www.tkjelectronics.dk/uploads/STM32F4_Discovery_CoOS.zip
Hopefully you will then be able to get a better idea of the problem and maybe bring me some suggestions on how to solve it.
Best Regards
Thomas Jespersen
#lwip #stm32f4 #coos