Menu

#125 Remove Path From #include For Zynq EMAC Driver

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

It would be nice if the "Zynq/" was removed from the #include statements in the FreeRTOS-Plus-TCP Zynq code. This is the only place a directory is used as part of a #include, and it is not needed. It makes it more dfficult to use the Xilinx XSDK toolset to compile the code.

I have compiled the code with the "Zynq/" removed, and it all worked as expected.

Files:
FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_hw.c
FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_dma.c
FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/uncached_memory.c
FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_hw.h
FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/x_emacpsif_physpeed.c
FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/NetworkInterface.c

Discussion

  • Richard Barry

    Richard Barry - 2020-02-25
    • status: open --> closed
     
  • Richard Barry

    Richard Barry - 2020-02-25

    It is added to enable you to bring in the versions of those files used (and/or modified) for use with the provided network interface. Otherwise they would need updating each time Xilinx updated their BSP.

     
  • Marty Otzenberger

    The file names are already different from the Xilinx BSP though (Xilinx doesn't have the underscore in the name after the 'x'), so including the "Zynq/" is redundant. As I noted, this is the only place in the codebase I have seen a path as part of a #include, and it makes for an awkward special case for buid scripts.

     
  • Hein Tibosch

    Hein Tibosch - 2020-02-25
    #include "Zynq/x_emacpsif.h"
    

    Needs -I $(TCP)/source/portable/NetworkInterface/

    Whereas

    #include "x_emacpsif.h"
    

    Needs -I $(TCP)/source/portable/NetworkInterface/Zynq/

    Maybe you have both -I directories already? I am afraid to break other projects when we change this.

    In earlier versions we had xemacpsif.h, but it led to confusion. But you are right, Zynq/x_emacpsif.h is a bit double.

     

Log in to post a comment.

MongoDB Logo MongoDB