Help using comp
create a component using:
sudo comp --compile con.comp
sudo comp --install con.comp
all I get is a regular linux executable file, no extension.
Same with:
sudo comp --compile --userspace con.comp
sudo comp --install --userspace con.comp
Adding a .ko extension does not help.
When I run "halrun", "loadrt con" it isn't found.
linuxcnc.dev is installed.
What the heck am I doing wrong?
Thanks, Don
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.
I do appreciate your help.
Please Log in or Create an account to join the conversation.
linuxcnc.org/docs/html/hal/comp.html#_options
...
function _;
option userspace yes;
...
Please Log in or Create an account to join the conversation.
After compiling from a directory under /home/don/, the file compiles and is installed as a regular linux
executable in "/usr/bin/"
Still no joy using "halcmd: loadrt con"
reinstalled linuxcnc.dev.
My system is:
ubuntu-10.04
linuxcnc-2.5.1
realtime-2.6.32-122-rtai
All of which seems to be up-to-date.
Thanks again, Don
Please Log in or Create an account to join the conversation.
Who is the owner of the file? I wonder if it needs a setuid root?After compiling from a directory under /home/don/, the file compiles and is installed as a regular linux
executable in "/usr/bin/"
Still no joy using "halcmd: loadrt con"
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
A userspace module is a normal linux executable to all intents, except that if you tried to run it as such it would error unless there was a running linuxcnc.
A realtime module is a kernel module and has the extension .ko
If you intend it to be a realtime module, perhaps you have omitted the function(_); declaration or similar and comp has compiled a userspace one instead.
Would beg the question of why you tried compiling it with
sudo comp --compile --userspace con.comp
sudo comp --install --userspace con.comp
however.
Why it is installing in /usr/bin is unknown if a rt mod.
You don't actually have to install it anywhere so long as the loadusr (not loadrt) command has a full path specified to it.
As cncbasher says, we need your .comp file
regards
Please Log in or Create an account to join the conversation.
You caught me! It's your "serialcon.comp" from your pendant post. I see "userspace is declar4d in the file,
so "--userspace" is not needed when installing.
This is such a great project, I thought I would try it! Everything is working but this. I am the owner of this
file on my system.
Maybe something got trashed during the download so here is what I have:
Please Log in or Create an account to join the conversation.
I ran a diff on your file and mine and aside from the header text missing, there are spurious characters in yours that come from the forum, that have cut and pasted into the file.
It gets excited by anything that looks like an escape sequences or HTML tags and sometimes substitutes rubbish, I should have attached a download, I will do that shortly.
The attached zip contains serialcon.comp and a compiled binary of it built under 10.04, so should run on your machine.
The binary permissions are set to 100755 so it should be able to be executed by anyone
Now that we know what you are compiling, there is nothing wrong with it going into /usr/bin, thats where mine lives on the $PATH where it can just be loaded by name.
It is loaded with loadusr -W serialcon somewhere at the top of your hal file and then net the pins at the end to make doubly sure that the pins have been created by then.
regards
Please Log in or Create an account to join the conversation.