Hello,i have been trying to make my own io-objects for my pi since I cant get the one in proview to work (no support for 32.bit?, never mind I want to do my own anyway
). Now to my problem: I have made a ra_io_user.c code-file like the one in the io-guide :
#include "pwr.h"
#include "rt_io_base.h"
pwr_dImport pwr_BindIoUserMethods(PiIO);
pwr_BindIoUserClasses(User) = {
pwr_BindIoUserClass(PiIO),
pwr_NullClass
};
I have made objects in the class-volume and creates objekt files from my c-files. When i build my node i get the following error:
** Plc program link errors for arm_linux node plc_pi1_0999_plc
/usr/bin/ld: /usr/pwr60/os_linux/hw_arm/exp/obj/rt_io_user.o:/data0/x6-0-0/pwr/src/exp/rt/src/rt_io_user.c:55: multiple definition of `pwr_gUser_IoUserClassMethods'; /usr/local/pwrp/pi1/bld/arm_linux/obj/ra_io_user.o:/usr/local/pwrp/pi1/src/appl/ra_io_user.c:9: first defined here
collect2: error: ld returned 1 exit status
row 9 is pwr_BindIoToUserClasses(User). If I change the argument from User to PiIO everything links ok but my io-methods does not seem to work. What am I doing wrong/what have I missed? Regards AE