Menu

#127 xCheckLoopback

open
nobody
None
5
2020-02-25
2019-02-28
No

The STM32Fxx and Zynq Network Interface files for FreeRTOS-Plus-TCP depend on the xCheckLoopback function to compile. This funciton is not defined in the code. Per the following forum post it is intended to be a part of FreeRTOS_ARP.c

https://sourceforge.net/p/freertos/discussion/382005/thread/3656c42f33/#72fb

Files:
FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Fxx/NetworkInterface.c
FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/NetworkInterface.c

Discussion

  • Hein Tibosch

    Hein Tibosch - 2019-02-28

    Hi Marty, the official drivers for FreeRTOS+TCP can be found at github/aws.

    I have occasionally posted newer versions of the drivers, either because they were better optimised, or they contained new features. Also in these drivers, I introduced a generic handler of the PHY, call common/phyHandling.c

    xCheckLoopback was one such features: it adds a simple loop-back device. It makes self-testing very easy:

    I hope that one day the drivers will be merged.

    I'm attaching FreeRTOS_loopback.zip which contains the adapted FreeRTOS_ARP.[ch]

    Allso attached a simple self-test with 2 UDP sockets.

     
  • Marty Otzenberger

    Thanks. I had a copy of the xCheckLoopback code from a forum post that is working for me. My primary goal with this request was to see if the FreeRTOS_ARP.[ch] code in this repo could be udpated (or the dependency could be removed from the Zynq port in this repo).

    I am managing my project with SVN, and was hoping to be able to use an SVN external to pull in all of the FreeRTOS-Plus code without modificaition, but that requires the Zynq port code and the FreeRTOS-Plus-TCP code in Source Forge to be compatible with eachother.

     
  • Hein Tibosch

    Hein Tibosch - 2019-03-03

    All I can ( and will ) do is propose my changes to the AWS/FreeRTOS team, and hope that it gets approved to be included into the official release.

     
  • Marty Otzenberger

    Understood. Hopefully everthing goes smoothly. Thanks.

     
  • Marty Otzenberger

    Quick update, it looks like the latest FreeRTOS+TCP Network Interface code in 10.3.0 removed the xCheckLoopback function. I can't speak to the need to put it back, but this at least resolves this issue since it no longer depends on an undefined function.

     
  • Hein Tibosch

    Hein Tibosch - 2020-02-25

    For those who get here, looking for the latestxCheckLoopback(), please find it attached. It has two modifications, one for FreeRTOS_ARP.c and one for FreeRTOS_ARP.h.

    It must be called from the xNetworkInterfaceOutput() function:

    BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxBuffer, BaseType_t bReleaseAfterSend )
    {
        if( xCheckLoopback( pxBuffer, bReleaseAfterSend ) != 0 )
        {
            /* The packet has been sent back to the IP-task.
            The IP-task will further handle it.
            Do not release the descriptor. */
            return pdTRUE;
        }
    

    All packets that have the local MAC-address as their destination, will be answered by the own IP-task.

     

Log in to post a comment.