Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

Problems compiling IP support with arm-gcc for Cortex4

Posted by stemora on July 27, 2017

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

Posted by rtel on July 27, 2017

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

Posted by stemora on August 1, 2017

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
include "FreeRTOS.h" //SM
include "list.h"
include
include
include
include
include

//#include //#include //#include

include
include
include
include

/* 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

Posted by heinbali01 on August 1, 2017

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

/* 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

Posted by stemora on August 2, 2017

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?


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS