LPC17xx and FreeRTOS-TCP NetworkInterface.c

sdcandy wrote on Wednesday, September 26, 2018:

I am looking at reworking an old project that uses the LPC1768 and am currently trying to work out whether FreeRTOS-TCP would be the better option than just updating the old version of lwIP that was used previously.

I have created a dummy project and am trying to compile the network driver under FreeRTOS v10.1.0 from Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/LPC17xx.

I have fixed a couple of issues where the pucBuffer field in the NetworkBufferDescriptor_t appears to have changed name to pucEthernetBuffer and it seemed to prefer xIPStackEvent_t instead of IPStackEvent_t.

I have warning from the compiler (gcc 7.3.1) that the external variable xNetworkEventQueue isn’t used anywhere in the NetworkInterface.c file (which is correct) - in which case, how are Ethernet events communicated to the IP task as the comment suggests?

Has anyone already fixed this driver and got it working with a recent version of FreeRTOS-TCP and can share their work?

Also, I see no evidence in the code of the PHY being initialised anywhere.

Thanks,

-Andy.

Hello sdcandy,
you had any success to port your lwip to FreeRTOS-TCP. Now i have a project where works with LWIP v1.4.1, but it have a lot of problems like stop receive after some time. I tried port this LWIP to the new version, but is tiring, because many things don’t work. I was reading about this version FreeRTOS-TCP and i saw that it is already ported for LPC17XX. I’m using LPC1788.
You got work this new version with LPC17xx well? you have any example to help me?

Thanks

…that the external variable xNetworkEventQueue isn’t used anywhere in
NetworkInterface.c
… how are Ethernet events communicated to the IP task?

In an earlier version of LPC17xx\NetworkInterface.c, the queue xNetworkEventQueue was accessed directly. In a later version, the function xSendEventStructToIPTask was called to pass a network buffer to the IP-task.
The declaration can be removed.

Also, I see no evidence in the code of the PHY being initialised anywhere.

I am not sure about the status of the LPC17xx driver today, but here is another, more recent post about it:

https://sourceforge.net/p/freertos/discussion/382005/thread/9ed36a53

I would like to attach source code for a generic PHY handler, but the forum only allows to attach pictures :frowning: