I am trying to set up FreeRTOS+TCP on a SAM4E Xplained Pro development board. I have set up the FreeRTOS kernel and it works as intended without +TCP extension. This is my first time trying to build +TCP so apologies for the rough state of the question. I feel like I am missing a step in setting up FreeRTOS+TCP, and I’ve been trying to figure it out for over a week now
I have added all of the “.c” files from the +TCP source, and the include directory, as well as the BufferManagement (BufferAllocation_2.c) and the GCC compiler files from portable. The include directories have been added to my project to find all the header files. At this point, the project builds correctly and I can upload to the board.
When I try to set up the network interface, however, it all falls apart. I am trying to add the “DriverSAM” files to the project, but when I do the compiler tells me that countless macros and types are undefined. I have added the phyHandling.h and .c files to the project as well, and found the conf_eth.h for the PHY chip I am using. I have also added a freeRTOSIPConfig.h file with the following defined:
#include "conf_eth.h"
#include "FreeRTOSIPConfigDefaults.h"
#define ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS 45
#define ipconfigEVENT_QUEUE_LENGTH (ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS + 5)
#define ipconfigNETWORK_MTU 586
#define ipconfigIP_TASK_STACK_SIZE_WORDS 0x500
#define ipconfigIP_TASK_PRIORITY 3
#define ipconfigZERO_COPY_RX_DRIVER 1
#define ETHERNET_CONF_DATA_OFFSET 2
With all of this set up, I am still getting the following compile errors. I have tried chasing down individual problems and defining things as needed, but I just wind up going down the rabbit hole and getting more and more errors. I don’t know what files I am missing or need to have created to get this to work.
|Error||implicit declaration of function 'pxPacketBuffer_to_NetworkBuffer' [-Werror=implicit-function-declaration]|C:\Users\pherrman\Documents\Atmel Studio\7.0\SAM4E_RTOS121\SAM4E_RTOS121\src\Plus-TCP\portable\NetworkInterface\DriverSAM\NetworkInterface.c|788|SAM4E_RTOS121|
|Error||#error This driver works optimal if ipconfigZERO_COPY_TX_DRIVER is defined as 1|C:\Users\pherrman\Documents\Atmel Studio\7.0\SAM4E_RTOS121\SAM4E_RTOS121\src\Plus-TCP\portable\NetworkInterface\DriverSAM\NetworkInterface.c|82|SAM4E_RTOS121|
|Error||'configMAC_INTERRUPT_PRIORITY' undeclared (first use in this function)|C:\Users\pherrman\Documents\Atmel Studio\7.0\SAM4E_RTOS121\SAM4E_RTOS121\src\Plus-TCP\portable\NetworkInterface\DriverSAM\NetworkInterface.c|590|SAM4E_RTOS121|
|Error||'GMAC_DCFGR_TXCOEN' undeclared (first use in this function)|C:\Users\pherrman\Documents\Atmel Studio\7.0\SAM4E_RTOS121\SAM4E_RTOS121\src\Plus-TCP\portable\NetworkInterface\DriverSAM\gmac_SAM.c|447|SAM4E_RTOS121|
|Error||'gmac_device_t {aka struct gmac_device}' has no member named 'p_tx_buffer'|C:\Users\pherrman\Documents\Atmel Studio\7.0\SAM4E_RTOS121\SAM4E_RTOS121\src\Plus-TCP\portable\NetworkInterface\DriverSAM\gmac_SAM.c|355|SAM4E_RTOS121|
|Error||'p_dev_mm' undeclared (first use in this function)|C:\Users\pherrman\Documents\Atmel Studio\7.0\SAM4E_RTOS121\SAM4E_RTOS121\src\Plus-TCP\portable\NetworkInterface\DriverSAM\gmac_SAM.c|350|SAM4E_RTOS121|