How modifing RPI4 source for custom EtherCAT driver (AX2006) in lcec

I want add support for different hardware (Beckhoff AX2006 driver) - Wher I can start.
I successfully build image for RPI4. I connect EtherCAT network to RPI4 Ethernet port, but how connect GUI computer to RPI4.
After boot I get error: ifconfig: SIOCGIFFLAGS: No such device.
Thank you.

Hi Marian,

For the connection of the rpi4 with a remote PC, we use this Ethernet HAT.

  • The error you got is due because this HAT is not mounted on you rpi4

The temporary fix this issue, you can comments the content of <OPENCN_HOME>/agency/rootfs/board/rpi4/rootfs_overlay/etc/network/interfaces (not tested, I don’t have a rpi4 available right now)

EtherCAT slave support
EtherCAT slave support are implemented in the lcec component - kernel part

  • Path: <OPENCN_HOME>/linux/opencn/components/lcec/

Here is a small overview on how to add support for a new slave:

  • In the above path, add the src/header file for your new slave: `lcec_my_slave.{c,h}
  • In the C file, implement the functions: lcec_my_slave_init(), lcec_my_slave_read() and lcec_my_slave_write()
  • Add the PDO definitions. It is possible to get it with the help of ./ethercat cstruct cli tool available in the rpi4 prompt.

You can get inspiration by looking how the other slaves have been implemented.

I’m working on an initial version of lcec documentation. It currently is under review.

  • path: doc/src/hal.rst
  • branch: 96-initial-hal-companion-documentation
    It should be integrated in master branch and so in the official documentation next week.

Hope this help. Don’t hesitate to ask any question you have

J-P

Hi Marian, hi all

The support for the AX5000 drives have been added to OpenCN framework.

Have a nice day
J-P