I developed an application which runs on the Renesas RX65N MCU.
Now, I am updating the application from FreeRTOS 202210.00 LTS to 202406.01 LTS, which means FreeRTOS-Plus-TCP will also be updated from v3.1.0 to v4.2.2.
After applying FreeRTOS-Plus-TCP v4.2.2, I encountered build error due to pxFillInterfaceDecscriptor function being undefined.
Scanning through the commit history and pull requests(PR#755) of FreeRTOS-Plus-TCP, I noticed that the function was fully implemented for certain vendors only.
Request
Please kindly advise how to proceed about this minor improvement? I would like to enable backward compatibility for FreeRTOS-Plus-TCP.
May I know why the backward compatibility code was fully implemented for selected vendors only?
With FreeRTOS+TCP version v4 and above, the FreeRTOS+TCP added support for IPv6 and multiple interfaces & endpoints. Hence the function name pxFillInterfaceDescriptor has been changed to name unique to the interface.
Please kindly advise how to proceed about this minor improvement? I would like to enable backward compatibility for FreeRTOS-Plus-TCP.
If you would like to use the network interface port with backward compatibility enabled then its required to add the following lines in your network interface file:
#if ( ipconfigIPv4_BACKWARD_COMPATIBLE != 0 )
/* Do not call the following function directly. It is there for downward compatibility.
* The function FreeRTOS_IPInit() will call it to initialice the interface and end-point
* objects. See the description in FreeRTOS_Routing.h. */
NetworkInterface_t * pxFillInterfaceDescriptor( BaseType_t xEMACIndex,
NetworkInterface_t * pxInterface )
{
return pxRX_FillInterfaceDescriptor( xEMACIndex, pxInterface );
}
#endif
If you are planning to use it without backward compatibility (recommended for latest features), then the application should call the interface specific fill interface descriptor before the FreeRTOS+TCP is initialized (you should also change your FreeRTOS+TCP initialization code similar to the example in the link):
extern NetworkInterface_t * pxRX_FillInterfaceDescriptor( BaseType_t xEMACIndex,
NetworkInterface_t * pxInterface );
/* Initialize the interface descriptor for RX. */
pxRX_FillInterfaceDescriptor(0, &(xInterfaces[0]));
May I know why the backward compatibility code was fully implemented for selected vendors only?
Since vendor specific network interface files aren’t core part of the FreeRTOS+TCP and is more of a reference, not all sample network interfaces have been tested with backward compatibility enabled.
Please feel free to raise a pull request to the FreeRTOS+TCP repo if you would like to make the changes necessary for backward compatibility in the network interface you are using.