Experience with lwIp or other network stacks?

4 replies [Last post]
chuckp
Offline
Joined: 2012-05-22

Has anyone ported the lwIp network stack to the LCP18xx?
Or does anyone have any experience to recommend a network stack to use with FreeRTOS?

0
Your rating: None

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
wellsk's picture
wellsk
Offline
Joined: 2011-05-17

A pre-built LPC18xx project for LWIP isn't included in the LWIP release, but I have used LWIP on the Hitex 1850 and 4350 boards.
(Currently, only projects/examples based on the LPC43xx CMSIS library are in the release.)
The LPC18xx and LPC43xx share the same Ethernet controller.

You can pull the LPC18xx CMSIS library and the LWIP port and convert the LPC43xx projects to LPC18xx projects to use this with the LCP18xx board.
You'll need to build using the M3 core instead of the M4 core. You might also need to alter the memory layout for the projects to the 18xx memory layout.
Change all header files to use the LPC18xx CMSIS base headers instead of the 43xx headers.
Fix possible compilation issues related to 18xx/43xx differences - there probably won't be too many.

You can go here for LWIP project specific details:
http://www.lpcware.com/content/project/lightweight-ip-lwip-networking-stack

The LWIP download page is here:
http://www.lpcware.com/content/nxpfile/lwip-lpc-port-file-v110

The 18xx and 43xx CMSIS download pages are here:
http://www.lpcware.com/content/nxpfile/lpc4350apdlzip
http://www.lpcware.com/content/nxpfile/lpc18xx-cmsis-compliant-standard-...

Kevin Wells

NXP Semiconductors

Kevin Wells

NXP Semiconductors

chuckp
Offline
Joined: 2012-05-22

Thanks, this is along the same lines that I was thinking. I have those files. What I don't find is a makefile or an IAR project file. Can you point me to a list of what files need to be included to build lwip?
I see some makefiles in obsolete projects, and I will start to take the time to understand it all and put it together.

chuckp
Offline
Joined: 2012-05-22

I built up a version of the project, but it's not running. I am open to ideas:
- I started from a simple FreeRTOS project which only started two tasks, one monitoring the uart and placing characters in a queue. The other monitoring the queue. This worked well before I added the lwip code.
- I added the LWIP files to the project and got it to compile. I excluded timer.c (as it conflicts with a FreeRTOS file).
- I initially hit the hard fault handler, but when I raised the stack sizes in my two tasks, that went away.
- The debugger shows there are no tasks to schedule and many registers are filled with A5. It looks like some stack overflowed.

But I have called no lwip code. What has been reconfigured?

I'd love to have an IAR project that includes a running lwip...

chuckp
Offline
Joined: 2012-05-22

Now I believe my program is crashing because the program is too big to load into RAM. Hence I am back to my previous post. I am studying to learn how to run from (SPI) flash.

feedback