Hi,
In an attempt to use a non standard "parallel port" address for my hardware,
I am starting to play with the hal_parport.c code. I started with the Ubuntu
Live CD which I installed on to my PC's hard drive. I then followed the wiki
directions to get the source code on to the PC. It now resides in a directory
named emc2-dev. For a simple test I modified the source code line in the file
hal_paport.c :
old text reads:
rtapi_print ( "config string '%s'\n", cfg );
next text reads:
rtapi_print ( "Config String '%s'\n", cfg );
this particular line is displayed in DMESG (see below) with the address being
tried (cfg is in my case 0x170) when there is a failure at setting up the
parallel port at the specified address. The only reason for the particular
change above is to test compiling and then running/testing EMC2 changes (which
I've so far failed at).
Anyway, after saving the modified code I did the following from my src
directory:
------------------------------------------
jeff@jeff-desktop:/emc2-dev/src$ ./autogen.sh
autom4te: cannot open autom4te.cache/requests: Permission denied
OK, so I put sudo in front and try again:
jeff@jeff-desktop:/emc2-dev/src$ sudo ./autogen.sh
it then asks for password then returns to terminal when complete, then I do the
following 3 commands:
jeff@jeff-desktop:/emc2-dev/src$ sudo ./configure --enable-run-in-place
jeff@jeff-desktop:/emc2-dev/src$ sudo make
jeff@jeff-desktop:/emc2-dev/src$ sudo make setuid
After compiling the code, I then close terminal and start a new one and go up 2
directories to get to the top directory. From there I run the environemnt
script:
jeff@jeff-desktop:/$ . /emc2-dev/scripts/emc-environment
and then from the terminal I run EMC by typing
emc
which is expected to fail since my ini file has 0x170 instead of 0x378 for the
parallel port address.This is fine, but I should see the changes in my DMESG
command.
But first a look at my emc-debug.txt file:
------------------
RUN_IN_PLACE=yes
EMC2_DIR=
EMC2_BIN_DIR=/emc2-dev/bin
EMC2_TCL_DIR=/emc2-dev/tcl
EMC2_SCRIPT_DIR=
EMC2_RTLIB_DIR=/emc2-dev/rtlib
EMC2_CONFIG_DIR=
EMC2_LANG_DIR=/emc2-dev/src/objects
INIVAR=inivar
HALCMD=halcmd
EMC2_EMCSH=/usr/bin/wish8.5
INIFILE=/home/jeff/emc2/configs/my-mill/my-mill.ini
PARAMETER_FILE=emc.var
EMCMOT=motmod
EMCIO=io
TASK=milltask
HALUI=
DISPLAY=axis
NML_FILE=
Starting EMC2 server program: emcsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Killing task emcsvr, PID=8810
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
-----------------------
now, in the DMESG dump you can see that the line's text has NOT been changed as
I expected both 'config' and 'string' to have the first letter capitalized as
shown in the text above.:
(a line from the DMESG dump):
[ 162.034686] config string '0x170 out '
since in the file :
my-mill.hal
I have the following line:
loadrt hal_parport cfg="0x170 out "
below is an ls -l of my files
==========================
I can see the following object files, that show that they were compiled
the old, not modified, hal_parport, originally installed file is at:
/rtlib
-rw-rw-rw- 1 root root 11249 2010-07-31 15:28 hal_parport.ko
and my new, run-in-place changes "should" be here
/src
-rw-r--r-- 1 root root 10385 2011-01-29 15:11 hal_parport.o
-rw-r--r-- 1 root root 11313 2011-01-29 15:11 hal_parport.ko
So I have 2 questions: Why do I need the SUDO in certain places where the
directions on the net do not say need it, AND any idea why my change is not
showing up when I try to run 'emc' from the terminal? Perhpas my environment
is running something wrong or 'make' isn't using the changes, or...??
Thanks,
Jeff
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users