FreeRTOS+TCP is an open source TCP/IP stack and as such is
supplied as
source files that are intended to be built as part of your RTOS
application.
It is best to start with a standard FreeRTOS
application (without the TCP/IP stack) that is known to be working correctly,
then add in the TCP/IP source files.
The application must be using the heap_4 or heap_5 memory allocator.
When you are sure the standard RTOS application is configured and
executing correctly:
Add the following core FreeRTOS+TCP source files into your project:
Add the driver for your network interface (the MAC or Ethernet driver) into your
project. Source files that implement network drivers are called NetworkInterface.c and are located in:
FreeRTOS-Plus/FreeRTOS_Plus_TCP/portable/NetworkInterface/[microcontroller]/
, where [microcontroller] is the family of microcontroller on which
FreeRTOS+TCP will run.
Instructions are provided for creating
network drivers for other chips.
Add your chosen network buffer allocation scheme
to your project. The source files that implement buffer allocation schemes are
located in:
FreeRTOS-Plus/FreeRTOS_Plus_TCP/portable/BufferManagement/.
At this time BufferAllocation_2.c is recommended for
simplicity because it obtains its RAM from the
FreeRTOS heap. BufferAllocation_2.c
can only be used with the heap_4 and heap_5 memory allocators.
Ensure the following core TCP/IP and chip specific include paths
are in your compiler's include path to enable the compiler can locate the necessary
header files:
where [compiler] is the compiler being used. Instructions are
provided for porting to new compilers,
which is very straight forward.
Add a FreeRTOSIPConfig.h header file to your project, and ensure
the constants it contains are
configured appropriately
for your application. You can use a configuration file provided in
an example project
as a starting point.
FreeRTOSIPConfig.h tailors the core TCP/IP stack for your application. It is
application specific, not TCP/IP stack specific, and should therefore be located
in an application directory rather than a FreeRTOS+TCP directory.