c-toon wrote on Thursday, April 05, 2018:
For a project I am working on I need to add TCP/IP to FreeRTOS.
I am using Keil to program a LPC1768 (Keil MCB1700 evaluation board).
The versions I use are FreeRTOS V10.0.0 and FreeRTOS+TCP V2.0.1.
I followed the instructions from “Adding the TCP/IP Source Files to an RTOS Project”.
I started from a working project that just blinks a led. After adding the files as described in the instructions (without editing code) I tried to build the project again and now I get an error from NetworkInterface.c saying it cannot include “FreeRTOS_IO.h”.
Do I really need to add FreeRTOS+IO to use the TCP/IP stack? If so is there any guide on how to properly add it? Because I tried to add the files to my project but I only get more errors for missing files.
Is there a Keil demo project using FreeRTOS+TCP I can use to start from? I searched for it but could only find demo’s using other TCP/IP stacks.
heinbali01 wrote on Thursday, April 05, 2018:
Hi Toon, I’m not sure why the driver wants to include
FreeRTOS_IO.h. What happens if you remove that line?
c-toon wrote on Monday, April 09, 2018:
First of all thanks for your response and sorry I didn’t reply sooner. At the end of last week the post didn’t show up for me so I assumed I did something wrong posting it and only today started working on this part again.
It looks like this line can be deleted. However I’m having more problems with the Networkinterface.c for LPC17xx from the source code download for FreeRTOS v10.0.0 and v10.0.1.
The file included “FreeRTOS_UDP_IP.h” I switched this out with “FreeRTOS_IP.h” & “FreeRTOS_IP_Private.h” by doing this I got rid of some but not all errors.
The errors that still remain are:
“configMAC_INTERRUPT_PRIORITY” is undefined
NetworkInterface.c declaration “BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer )” is incompatible with “BaseType_t xNetworkInterfaceOutput(NetworkBufferDescriptor_t *const, BaseType_t)” in NetworkInterface.h
“xNETWORK_BUFFER” has no field “pucBuffer”
Any suggestion on how to solve this?
Thank you for your help
heinbali01 wrote on Monday, April 09, 2018:
I’m not sure yet why you encounter those compiler errors. Are you using the older +UDP or +TCP?
Just to make sure: the kernel and the latest FreeRTOS+TCP sources can be downloaded from github.
The +TCP and +FAT demo applications must still be downloaded from freertos
This ZIP file will also contain older versions of the kernel and the libraries: just ignore them.
c-toon wrote on Tuesday, April 10, 2018:
I was using the files from https://sourceforge.net/projects/freertos/files/FreeRTOS/V10.0.1/
The github files seem to be the same, but I switched just to be sure. After doing this I stil get the same errors as in the beginning.
The NetworkInterface for lpc17xx seems to be the only one that wants to include FreeRTOS_IO.h and FreeRTOS_UDP_IP.h.
Thanks anyway for the suggestion it was worth a try.
heinbali01 wrote on Tuesday, April 10, 2018:
Let’s find an asnwer: could you email me on “hein [at] htibosch [point] net” ?
I am having the same issue as this post. This is a bit discouraging since that post was in 2018
I have a recent FreeRTOS version (10.3.1) and FreeRTOS+TCP V2.2.1. My device is also LPC1768 (also LPC1769).
I am developing within IAR. My base project works OK. So, I am now challenging to implement +TCP on top of it.
I have also followed up the steps presented here
I have removed that as @c-toon did;
But, it has just brought some other errors.
I don’t know how to proceed with those errors. Should I pursue every single error until all are gone? Or you think I made mistakes which led me that situation? Or I am using a wrong
file? You may see mine attached. (from this folder: FreeRTOS-Plus-TCP\portable\NetworkInterface\LPC17xx)
NetworkInterface.c (8.3 KB)
I am having the same issue as this post.
This is a bit discouraging since that post was in 2018
Yes, I can imagine!
Unfortunately, I do not have an LPC17xx my self, otherwise there would be a perfect network interface by now.
The NetworkInterface.c that you are attaching, is the same version as I have here. Toon Caeyers ( @c-toon ) worked on it before.
You should change:
This is an old driver, it was written when FreeRTOS had an IP-stack with UDP only. That is why
FreeRTOS_UDP_IP.h was included.
Thanks again for your inputs, I appreciate.
If someone could make LPC17xx device ready for TCP/IP stack within FreeRTOS, I believe that there might be some considerable boost in using FreeRTOS. It would have also been a nice recent ARM_CM3 sample for FreeRTOS.
After I manually adding
lpc17xx_emac.h and some other bunch of CMSIS header files related to it and adding this
#include "FreeRTOS_IP.h", there are now some other errors showed up unfortunately.
I have pursued all of the errors one by one and each fix I did, mostly brought some more unfortunately. My FreeRTOS base comes from one of the samples for LPC1768 (which is the only one actually). It comes with uIP. I could live with it. But, I can’t find any reliably support or sample made for FreeRTOS and LPCxx (or some other Arm-CM3) particularly for networking. All I wanted to run TCP Client. I can only run Http server on it which is already part of the sample, It was just matter of changing the IP Address to mine, that’s it.
Unfortunately, I couldn’t make much of progress implementing FreeRTOS+TCP on LPC1768.
Still 8 errors after cleaning up, adapting old CMSIS to new one because it is required. The sample code has only fragment of CMSIS. Once you start adding new headers from your CMSIS, it complains a lot due to incompatibility. I have already adapted more than 200 lines of code to fix this.
In fact that, you don’t need one from day one. For instance, this week I didn’t even power up mine since I couldn’t have a successful build. Once you can build, I can gladly test it for you. Or even better, you can simply connect to my computer if you like. That will give the community a nice brand new working networking sample for one of the most liked chip. I still use it with mBed-OS, lovely.