This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EtherCAT Slave demo desn't compile with PDK 1.0.4

Hi,

I'm trying to compile the Ethercat slave demo (PRU-ICSS-EtherCAT_Slave_01.00.00.00) with the latest PDK but it doesn't work. First of all, the linked file "pruicss_device.c" point to a non-existing file in the PDK. I think it's been renamed to "pruicss_soc.c". Then, the content ot the linked file "AM57x_board.c" has completely changed, there's no function AM57x_setup() function anymore. What should I do? Revert to PDK 1.0.3?

Also, I find it a bit disturbing that files in the PRU-ICSS EtherCAT package includes private files of the PDK instead of the public header. For example, "tiescutils.c" includes these:

#include <ti/csl/src/ip/mdio/V2/cslr_mdio.h>
#include <ti/csl/src/ip/mdio/V2/csl_mdio.h>
#include <ti/csl/src/ip/mdio/V2/csl_mdioAux.h>

instead of:

#include <ti/csl/cslr_mdio.h>
#include <ti/csl/csl_mdio.h>

Is there a reason for this?

Thanks,

Francis

  • The EtherCAT experts have been notified. They will respond here.
  • Actually, what is the recommended way to create a custom Ethercat application? Is there a guide somewhere that I missed? The PRU-ICSS EtherCAT package is tightly coupled with board specific files and it's really hard to determine what I have to extract and customize. I don't understand why the AM57x_board.c and pruicss_soc.c files are compiled in the project. Why can't we use these functions like any other API call? Our board won't be exactly the same as the IDK, but it will be really close. We could reuse most of the initialization functions, but it's not clear to me how I can do that.
  • Hi Francis,

    The next release of PRU-ICSS-EtherCAT_Slave will be compatible with PDK 1.0.4. Before it's released, please don't try to build PRU-ICSS-EtherCAT_Slave_01.00.00.00 with the latest PDK. There is no particular reason that public mdio header file is not used. The PRU-ICSS-EtherCAT_Slave package is currently limited to AM57x device, so we use the private files under V2/ which is AM57x specific.

    pruicss_soc.c contains PRUICSS configuration structure which should not need any changes to build into your project. You probably need to tweak the PHY initialization in AM57x_board.c per your board's pinmux settings.

    Regards,
    Garrett
  • Hi Francis, did you try to build EtherCAT slave application 1.0.0.0 with PDK 1.0.3? You can get PDK 1.0.3 from a previous Processor SDK (ex. )

    Thank you,

    Paula

  • Hi,
    Yes, it builds with PDK 1.0.3, but my main problem is to extract what I need from the demo to create my own application. This demo is structure in a way that makes it really hard to customize. It doesn't make sense to me to include .c files from the PDK inside the projet. Anyway, I managed to build something, but it's not what I call clean code.