Sebastian Lehnhoff wrote: > Hi Folks! > > On my way learning RTAi + rtnet I tried to run the soundmsg example from > the RTAI-showroom. Unfortunately, it did not run out of the box. Here is, > what I have done so fare: > > The newest version from > http://cvs.gna.org/cvsweb/showroom/v3.x/?cvsroot=rtai uses > rt_thread_create, which is only available in RTAI-3.2. So I compiled 3.2 > and recompiled my rtnet-0.8.3. Like described in the file > rtai-3.2/base/ipc/netrpc/README I inserted "#define HARD_RTNET 1" in the > file rtai-3.2/base/ipc/netrpc/netrpc.c to tell the compiler to use rtnet. > But running run1 from the soundmsg example I get this errors while loading > the rtai_netrpc module: > --------------------------- > /usr/realtime/modules/rtai_netrpc.o: /usr/realtime/modules/rtai_netrpc.o: > unresolved symbol rt_recvfrom > /usr/realtime/modules/rtai_netrpc.o: /usr/realtime/modules/rtai_netrpc.o: > unresolved symbol rt_socket_callback > /usr/realtime/modules/rtai_netrpc.o: /usr/realtime/modules/rtai_netrpc.o: > unresolved symbol rt_sendto > /usr/realtime/modules/rtai_netrpc.o: /usr/realtime/modules/rtai_netrpc.o: > unresolved symbol rt_bind > /usr/realtime/modules/rtai_netrpc.o: /usr/realtime/modules/rtai_netrpc.o: > unresolved symbol rt_close > /usr/realtime/modules/rtai_netrpc.o: /usr/realtime/modules/rtai_netrpc.o: > unresolved symbol rt_socket > ---------------------------- > > Looking in the netrpc.c and rtnet source I found, that there is a > name-mismatch. In rtnet the functions are called recvfrom_rt and so on. > (What version of rtnet are the rtai-guys using?!).
This is a question someone of the RTAI community may answer best. I guess that the 3.2 branch is stuck to RTnet < 0.8 with respect to netrpc. > So I inserted the following code in rtai-3.2/base/ipc/netrpc/netrpc.c: > ----------------------------- > #define USE_RT_XXX_WRAPPER 1 > > #include "/usr/local/rtnet/include/rtnet.h" > #include "/usr/local/rtnet/include/rtdm.h" > ----------------------------- > Afterwards, only the error for rt_socket_callback remains :) ! > (Should I send them a bugreport, or am I using the wrong versions?) > > Trying to resolv the remaining error I additionally inserted: > ----------------------------- > static inline int rt_socket_callback(int sock, > int (*func)(int sock, void *arg), > void *arg) > { > struct rtnet_callback callback = { func, arg }; > > /* set up callback handler */ > return ioctl_rt(sock, RTNET_RTIOC_CALLBACK, &callback); > } > ------------------------------- > That resolves the unresolved-symbol error. But running run1 from the > soundmsg example player.c oopses. :( > I know, "int sock" in the argument list from func is not the same as > "struct rtdm_dev_context *" in func of the struct rtnet_callback used in > ioctl_rt. But I do not know, how to convert that properly... > Perhaps, someone on this list has a better idea. Did you already try the magma CVS? There is hope that the included netrpc version is more compatible with recent RTnet. Note that RTnet SVN head does not yet work with any RTAI version due to incomplete RTDM support of that variant - work in progress according to the maintainers. Jan
signature.asc
Description: OpenPGP digital signature