sittner / linuxcnc-ethercat

LinuxCNC EtherCAT HAL driver
GNU General Public License v2.0
200 stars 137 forks source link

problem with the integration of the ectty.h library #96

Closed robochime closed 3 years ago

robochime commented 3 years ago

Good morning, if you can help me, I integrated the library using #include "../include/ectty.h" the compilation is correct, but when I start lcec.so I have symbols inflicted in ectty_tx_data, I have to modify the realtime.mk file no ? could you help me with that? thanks.

sirop commented 3 years ago

More info would be helpful. Please show your installations steps.

robochime commented 3 years ago

Hello @sirop install ec-debianize with option --enable-tty, then modify the tty example to work EL6001, it works fine, now I want to integrate it into linuxcnc-ethercat, created a new one called EL6001, and I can bring it to OP, I want to integrate the library TTY, in the EL6001.C file I include the "../include/ectty.h" library and linuxcnc-ethercat compiles well, when I start linuxcnc it gives me the following start lcec.so I have symbols inflicted in ectty_tx_data

sirop commented 3 years ago

Copy-paste this error message please.

robochime commented 3 years ago

Captura de pantalla de 2020-11-08 13-33-41

sirop commented 3 years ago

Frankly speaking, I do not know what to do here. Maybe, add "../include/ectty.h" to EXTRA_CFLAGS ...

robochime commented 3 years ago

Hello @sirop not working at the moment, but thank you very much for the help.

robochime commented 3 years ago

Captura de pantalla de 2020-11-22 20-33-16 Captura de pantalla de 2020-11-22 20-33-37 Captura de pantalla de 2020-11-22 20-40-53

Hello @sirop Can I ask you in which file would you add " "../include/ectty.h" a EXTRA_CFLAGS ."

user .mk? realtime.mk?, tried various things seen on the internet, but not which way is correct?

thanks

sirop commented 3 years ago

You can try user.mk , but what about this:

I have successfully tested the tty example from ethercat master, but it is designed for a kernelspace cyclic task only.

How can I modify this example to use a Beckhoff EL6002 with my ethercat cyclic task in userspace ?

https://etherlab-users.etherlab.narkive.com/4jqS34Oc/virtual-tty-el6002-with-ethercat-in-userspace

robochime commented 3 years ago

Hello @sirop , if I sent you an email but I have no response, I did not find any example in linuxcnc-ethercat, it may be that you are posing it wrong, I think I would still have to link ec_tty.o or ec_tty.ko, I posted a message on the IGH ETHERCAT forum, in case you can help me. Thanks

it would be like this? $ ( CC ) -o $ @ $ ( EXTRA_CFLAGS ) -URTAPI -UMODULE -DULAPI -Os -I/usr/include/ectty.h -c $ <

sirop commented 3 years ago

@robochime You can try smth. like this, but it is more important to answer first Sebastien Blanchet's question from https://etherlab-users.etherlab.narkive.com/4jqS34Oc/virtual-tty-el6002-with-ethercat-in-userspace .

robochime commented 3 years ago

Hello @sirop the answer to the question, the virtual TTY only works in KERNEL mode it does not work is USER SPACE

sirop commented 3 years ago

@robochime But you build linuxcnc-ethercat (lcec.so) for userspace, so as I understand it, you can neither build nor use TTY in userspace.

robochime commented 3 years ago

Hi @sirop, Hi, I'll have to find another way to use serial transmission in user mode, thank you very much