Hi Peter,
Am 31.01.19 um 16:25 schrieb Peter C. Wallace:
> RTnet was going to be folded into Xenomai using RTDM but very
> sadly the guy working on this (Gilles Chanteperdrix) died
> unexpectedly in 2016. I think ist is abandoned at this point.
really sad news....
I'm also not sure, to continue the driver-developement.
But I would give it a try.
The raspberry could be a good entry-point for new users interested
in linuxCNC.
Because: it's cheap and nearly everybody has a raspberry at home... ;-)
My 4-axis mill is running in testmode with my new driver. But the
sharemem-driver itself runs in userspace. It works, but doing
the raw-ether-communication should be better a RT-task.
In an RT-environment (3.4-9-rtai) I am able to compile with:
(derivated from "halcompile --compile --userspace pcIOethRaw.c")
---------------------------------
gcc -Os -g -I./ -I/usr/realtime-3.4-9-rtai-686-pae/include -I.
-I/usr/realtime-3.4-9-rtai-686-pae/include -I/usr/include/i386-linux-gnu
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
-fno-math-errno -funsafe-math-optimizations -fno-rounding-math
-fno-signaling-nans -fcx-limited-range -mhard-float -DRTAI=3 -fno-fast-math
-mieee-fp
-fno-unsafe-math-optimizations -DRTAPI -D_GNU_SOURCE -Drealtime -D__MODULE__
-I/usr/include/linuxcnc -Wframe-larger-than=2560 -URTAPI -U__MODULE__ -DULAPI
-Os -o pcIOethRaw
pcIOethRaw.c -Wl,-rpath,/lib -L/lib -llinuxcnchal
---------------------------------
In an userspace-environment this also works:
---------------------------------
halcompile --compile hal/drivers/hal_skeleton.c
gcc -Os -g -I./ -I/mnt/sda6/linuxcnc.2.7.14/src/include -DUSPACE -fno-fast-math
-mieee-fp -fno-unsafe-math-optimizations -DRTAPI -D_GNU_SOURCE -Drealtime
-D__MODULE__
-I/mnt/sda6/linuxcnc.2.7.14/include -Wframe-larger-than=2560 -DSIM -fPIC
-URTAPI -U__MODULE__ -DULAPI -Os -o pcIOethRaw pcIOethRaw.c
-Wl,-rpath,/mnt/sda6/linuxcnc.2.7.14/lib
-L/mnt/sda6/linuxcnc.2.7.14/lib -llinuxcnchal -pthread
---------------------------------
But it I try to compile inside the RT-system for userspace,
this is the resulting error.
---------------------------------
halcompile --compile --userspace hal/drivers/hal_parport.c
gcc -Os -g -I. -I/usr/realtime-3.4-9-rtai-686-pae/include -I.
-I/usr/realtime-3.4-9-rtai-686-pae/include -I/usr/include/i386-linux-gnu
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
-fno-math-errno -funsafe-math-optimizations -fno-rounding-math
-fno-signaling-nans -fcx-limited-range -mhard-float -DRTAI=3 -fno-fast-math
-mieee-fp
-fno-unsafe-math-optimizations -DRTAPI -D_GNU_SOURCE -Drealtime -D__MODULE__
-I/usr/include/linuxcnc -Wframe-larger-than=2560 -URTAPI -U__MODULE__ -DULAPI
-Os -o hal_parport
/tmp/tmpyv2NQK/hal_parport.c -Wl,-rpath,/lib -L/lib -llinuxcnchal
In file included from /tmp/tmpyv2NQK/hal_parport.c:100:0:
/usr/include/linuxcnc/rtapi_app.h:27:1: warning: data definition has no type or
storage class [enabled by default]
/usr/include/linuxcnc/rtapi_app.h:27:1: warning: parameter names (without
types) in function declaration [enabled by default]
/usr/include/linuxcnc/rtapi_app.h:28:1: warning: data definition has no type or
storage class [enabled by default]
/usr/include/linuxcnc/rtapi_app.h:28:1: warning: parameter names (without
types) in function declaration [enabled by default]
/tmp/tmpyv2NQK/hal_parport.c:113:15: error: expected declaration specifiers or
‘...’ before string constant
/tmp/tmpyv2NQK/hal_parport.c:114:20: error: expected declaration specifiers or
‘...’ before string constant
/tmp/tmpyv2NQK/hal_parport.c:115:16: error: expected declaration specifiers or
‘...’ before string constant
/tmp/tmpyv2NQK/hal_parport.c:117:22: error: expected ‘)’ before string constant
make: *** [hal_parport] Fehler 1
---------------------------------
Another error with "hal_skeleton.c" on the same RT-system
---------------------------------
halcompile --compile --userspace hal/drivers/hal_skeleton.c
gcc -Os -g -I. -I/usr/realtime-3.4-9-rtai-686-pae/include -I.
-I/usr/realtime-3.4-9-rtai-686-pae/include -I/usr/include/i386-linux-gnu
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
-fno-math-errno -funsafe-math-optimizations -fno-rounding-math
-fno-signaling-nans -fcx-limited-range -mhard-float -DRTAI=3 -fno-fast-math
-mieee-fp
-fno-unsafe-math-optimizations -DRTAPI -D_GNU_SOURCE -Drealtime -D__MODULE__
-I/usr/include/linuxcnc -Wframe-larger-than=2560 -URTAPI -U__MODULE__ -DULAPI
-Os -o hal_skeleton
/tmp/tmpWZkIup/hal_skeleton.c -Wl,-rpath,/lib -L/lib -llinuxcnchal
In file included from /tmp/tmpWZkIup/hal_skeleton.c:79:0:
/usr/include/linuxcnc/rtapi_app.h:27:1: warning: data definition has no type or
storage class [enabled by default]
/usr/include/linuxcnc/rtapi_app.h:27:1: warning: parameter names (without
types) in function declaration [enabled by default]
/usr/include/linuxcnc/rtapi_app.h:28:1: warning: data definition has no type or
storage class [enabled by default]
/usr/include/linuxcnc/rtapi_app.h:28:1: warning: parameter names (without
types) in function declaration [enabled by default]
/tmp/tmpWZkIup/hal_skeleton.c:92:20: fatal error: asm/io.h: Datei oder
Verzeichnis nicht gefunden
compilation terminated.
make: *** [hal_skeleton] Fehler 1
---------------------------------
More confusing me is this on the userspace-system (4.15.0-20-generic)
this is OK:
---------------------------------
halcompile --compile hal/drivers/hal_skeleton.c
Compiling realtime hal_skeleton.c
Linking hal_skeleton.so
---------------------------------
But this:
---------------------------------
halcompile --compile --userspace hal/drivers/hal_skeleton.c
gcc -Os -g -I. -I/mnt/sda6/linuxcnc.2.7.14/src/include -DUSPACE -fno-fast-math
-mieee-fp -fno-unsafe-math-optimizations -DRTAPI -D_GNU_SOURCE -Drealtime
-D__MODULE__
-I/mnt/sda6/linuxcnc.2.7.14/include -Wframe-larger-than=2560 -DSIM -fPIC
-URTAPI -U__MODULE__ -DULAPI -Os -o hal_skeleton /tmp/tmpii6zcQ/hal_skeleton.c
-Wl,-rpath,/mnt/sda6/linuxcnc.2.7.14/lib -L/mnt/sda6/linuxcnc.2.7.14/lib
-llinuxcnchal
In file included from /tmp/tmpii6zcQ/hal_skeleton.c:2:0:
/mnt/sda6/linuxcnc.2.7.14/include/rtapi_app.h:27:1: warning: data definition
has no type or storage class
EXPORT_SYMBOL(rtapi_app_main);
^~~~~~~~~~~~~
/mnt/sda6/linuxcnc.2.7.14/include/rtapi_app.h:27:1: warning: type defaults to
‘int’ in declaration of ‘EXPORT_SYMBOL’ [-Wimplicit-int]
/mnt/sda6/linuxcnc.2.7.14/include/rtapi_app.h:27:1: warning: parameter names
(without types) in function declaration
/mnt/sda6/linuxcnc.2.7.14/include/rtapi_app.h:28:1: warning: data definition
has no type or storage class
EXPORT_SYMBOL(rtapi_app_exit);
^~~~~~~~~~~~~
/mnt/sda6/linuxcnc.2.7.14/include/rtapi_app.h:28:1: warning: type defaults to
‘int’ in declaration of ‘EXPORT_SYMBOL’ [-Wimplicit-int]
/mnt/sda6/linuxcnc.2.7.14/include/rtapi_app.h:28:1: warning: parameter names
(without types) in function declaration
/tmp/tmpii6zcQ/hal_skeleton.c:28:15: error: expected declaration specifiers or
‘...’ before string constant
MODULE_AUTHOR("Martin Kuhnle");
^~~~~~~~~~~~~~~
/tmp/tmpii6zcQ/hal_skeleton.c:29:20: error: expected declaration specifiers or
‘...’ before string constant
MODULE_DESCRIPTION("Test Driver for ISA-LED Board for EMC HAL");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/tmpii6zcQ/hal_skeleton.c:30:16: error: expected declaration specifiers or
‘...’ before string constant
MODULE_LICENSE("GPL");
^~~~~
/tmp/tmpii6zcQ/hal_skeleton.c: In function ‘rtapi_app_main’:
/tmp/tmpii6zcQ/hal_skeleton.c:174:18: warning: implicit declaration of function
‘hal_export_funct’; did you mean ‘hal_float_t’?
[-Wimplicit-function-declaration]
retval = hal_export_funct(name, read_port, &(port_data_array[0]),
^~~~~~~~~~~~~~~~
hal_float_t
Makefile:2: recipe for target 'hal_skeleton' failed
make: *** [hal_skeleton] Error 1
------------------------
What I am doing wrong?
Or is it impossible to (hal)compile in userspace on an RT-system
and in RT on a vanilla-userspace-system?
Where can I find further documentation about the mesa-cards?
(I have never seen anyone)
They do not generate stepper-pulses themself and are just
IO-ports like the parport?
Regards
wicki
> We (Mesa) had originally used RTnet+RTAI for our Ethernet connected
> motion devices but the lack of modern MAC support led us to try Preempt-RT and
> userland real time and it proved adequate for servo thread rate realtime
> and keeps getting better as Preempt-RT improves.
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers