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.

Porting EtherCAT Slave from ISDK to Linux

Hi All

I am planning to develop an integrated equipment, of which daughter boards are connected via EtherCAT. For Simplicity, I want a single basic system to support it.

Here is the draft plan:

Hardware : AM3359 is used, and the mini-system are mainly copied from Beaglebone Black, except MIIs are interchanged by PRU-MIIs.

Software:    Our applications are developped based on ti-process-sdk-linux;

             an open source of EtherCAT master is transplanted to the ti-process-sdk-linux;

             EtherCAT slave solution in sysbios_ind_sdk is transplanted to the ti-process-sdk-linux.

Questions:

                If it possible to transplant EtherCAT(Slave) to the ti-process-sdk-linux. If so, how long will be taken for a veteran, such as a experienced TI guy?

                How many interfaces are used by PRU firmware for EtherCAT slave, besides 2 PRU-MII? 

                Could the PRU-MIIs controlled by PRU firmware for EtherCAT slave used as normal MIIs? Or I have to prepare other PRU firmware for EtherCAT master to implement network functions?

I am not sure if my idea is clear enough, any sugestions or questions would be prefered !

  • Hi,

    No, EtherCAT Slave is not supported under Linux.
  • That doesn't mean it is not possible at all...
    Some 3Ps offer commercial solutions. E.g. http://www.ibv-augsburg.net

    Regards,
  • bo jiang said:
    How many interfaces are used by PRU firmware for EtherCAT slave, besides 2 PRU-MII? 

    You should also plan to connect the PRU MDIO to the phys... Otherwise think about Sync and Latch signals for EtherCAT if you need to run DC mode.

    bo jiang said:
    Could the PRU-MIIs controlled by PRU firmware for EtherCAT slave used as normal MIIs?

    No, that is a different firmware (see ICSS EMAC driver in PDK). Hardware is the same so you can switch by software.

    bo jiang said:
    Or I have to prepare other PRU firmware for EtherCAT master to implement network functions?

    Different question? Again ICSS EMAC PRU firmware may be used for standard Ethernet or as a basis for EtherCAT master (single port).

  • Hi Frank

    Thanks for your detailed information in your both replies! They helps a lot.

    Since I am working on an experimental project, I am not going to turn to a 3rd Party right now.

    I have seen a figure in <<EtherCAT Firmware API Guide.pdf>>, if I can move

    • EtherCAT Slave Stack Lib;
    • PRUSS Driver(API);
    • ESC related code in Sys/Bios and Starterware;
    • PRU Firmware;

    to an ordinary Linux System?

  • I had exact the same question. An answer would be appreciated.

  • Yes, you can port the driver and adaptation layers to Linux. That is exactly what the 3Ps are doing. However you need to consider different driver models and real-time behaviour in an HLOS. RT-Linux is recommended therefor. DC mode may be less trivial...
    The ETG stack is simple and may run in a single user task or app.
    PRU firmware won't change and it is implementing the majority of EtherCAT protocol anyway.

    Regards,
  • Hi Frank
    I have been porting 'ethernet_mac' of ICE's example to linux these days. I believe it would work fine though I have no hardware to verify it so far. However I turned back to 'ethercat_slave', I found maybe something really matter I have missed before:
    EtherCAT Slave Stack Lib, which composed of EtherCAT Slave stack(Beckoff) and Protocol Adaptation Layer(TI), are provided as an object rather than source code. I have noticed that ICE example project are compiled by GNU v4.8.4(Linaro), maybe gcc-arm-none-eabi-4_8, while BBB compiled by arm-linux-gnueabihf-.

    Does it mean 'libecat_slave_stack_gcc.a' in sdk\protocols\ethercat_slave\stack_lib\am335x cannot be used in linux system?

    I have gotten SSC_V5i11 from ETG, is there any chances for me to get the source code of Protocol Adaptation Layer?
  • Hi Bo,

    We are in the process of doing just that (porting Ethercat Slave of TI to linux RT). Can you tell me what is involved and if the scheduling seems to be deterministic? I guess it would live as a module driver in Linux and the application would use it through read/write and ioctl interface.

    Is this work by any chance able to be shared to the community?

    Thanks!

  • Hi Frederic

    It's good to know that there is someone doing the same thing.
    I have just compiled source code of EtherCAT slave into Linux - make some stubs and solve compile conflicts, and the solution is quite rude, it's a tough job to point the changes out. So I am afraid it's not a good time to make it public.

    Hoping everything goes well with your work.