Problems compiling IP support with arm-gcc for Cortex4

Hi all, we inserted ‘base’ FreeRTOS in our projects and everything work fine. Now I need to add the Ethernet support and I added the TCP package. For a compile test I onlt added the FreeRTOSIP.c file: it generates a lot of errors. I dig them until I guess to have found the root problem: in list.h file some functions are defined with the constant PRIVILEGEDFUNCTION. This one generates the error: ~~~ FreeRTOSinclude/list.h:386:6: error: old-style parameter declarations in prototyped function definition ~~~ and all the other errors. I found the definition of this constant in mpuwrappers.h: this is included by portable.h file that is included by FreeRTOS.h file. My guess the problem is due to the late inclusion of FreeRTOS.h in the FreeRTOSIP.c file: the previous inclusions of the .h files do not see the constant definitions and produce the error. If I move the FreeRTOS.h before the FreeRTOS_.h files I get the error: ~~~ include/tcp/FreeRTOSARP.h:77:2: error: unknown type name ‘MACAddresst’ MACAddresst xMACAddress; /* The MAC address of an ARP cache entry. */ ~~~ but this type is defined in the FreeRTOSIP.h that’s included after the FreeRTOS_APR.h. I’m lost in the inclusion order of the h files ……. Thanks

Problems compiling IP support with arm-gcc for Cortex4

I’m not sure what would happen if you only built one source file. I would recommend opening one of the example projects provided in the +TCP (Labs) download to see the files that are being built. That can be done using the Win32 example, which only requires the free community edition of Visual Studio. Once you have the example project opened in Visual Studio it should build without any problems, then you can use it as a reference as to which files to build and which include paths to set.

Problems compiling IP support with arm-gcc for Cortex4

Ok, I’m able to compile the TCP+FAT files but I needed to change in every *.c file the include order as follow (ex. for FreeRTOS_DHCP.c): ~~~ … /* Standard includes. */

include <stdint.h>

include “FreeRTOS.h” //SM

include “list.h”

include <tcp/FreeRTOS_IP.h>

include <tcp/FreeRTOSIPPrivate.h>

include <tcp/FreeRTOS_Sockets.h>

include <tcp/FreeRTOS_ARP.h>

include <tcp/FreeRTOS_DHCP.h>

//#include <tcp/FreeRTOSIP.h> //#include <tcp/FreeRTOSIPPrivate.h> //#include <tcp/FreeRTOSSockets.h>

include <tcp/FreeRTOSTCPIP.h>

include <tcp/FreeRTOSUDPIP.h>

include <tcp/NetworkBufferManagement.h>

include <tcp/NetworkInterface.h>

/* FreeRTOS includes. */ //-#include “FreeRTOS.h”

include “task.h”

include “semphr.h”

… ~~~ It sounds a bit strage but that’s it ..

Problems compiling IP support with arm-gcc for Cortex4

I’m not sure how or where you obtained the source code, but the current FreeRTOS_DHPC.c ( and other source files ) use these includes: ~~~ /* Standard includes. */

include <stdint.h>

/* FreeRTOS includes. */

include “FreeRTOS.h”

include “task.h”

include “semphr.h”

/* FreeRTOS+TCP includes. */

include “FreeRTOS_IP.h”

include “FreeRTOS_Sockets.h”

include “FreeRTOSIPPrivate.h”

include “FreeRTOSUDPIP.h”

include “FreeRTOSTCPIP.h”

include “FreeRTOS_DHCP.h”

include “FreeRTOS_ARP.h”

~~~ The project assumes that you have these as an include directory: ~~~ -I FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include -I FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/ [ GCC | IAR | MSVC | Renesas ] -I FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/protocols/include ~~~ Your post is a bit confusing: you write about “+FAT” and you’re showing source files that belong to the FreeRTOS+TCP library. Can you please tell where you downloaded the sources?

Problems compiling IP support with arm-gcc for Cortex4

I’m very sorry. I compared my files against the original ones and I discovered that my colleague changed them 🙁 The files are perfectly compilable for an LPC1778. Sorry again. By the way, is there a NetworkInterface.c file available for NXP LPC1778 ? I found a version from a newsletter’s subscriber but it include some files not included on my sdk (by NXP): ~~~

include “lpc17xx_emac.h”

include “lpc17xx_pinsel.h”

~~~ Where I can find them, please?