Re: Trying to build new module


Hello Paul, others

A kludge got be around the PARPORT problem,
by defining it - no solution, see below.

The modified sources, makefiles, ini-s are to be found at:
http://www.shoddyproducts.com/T-DRIVE/emc/fpga

With the kludge something comes up, but it can't home.
(Following error, bridgeport amplifier faults, etc...)
It never seems to call my init routine, which zeros the
DACs.  (I use a DVM, I'm not turning those motors
on for while; even though they have no load.)

Major question - how can I put debugging output
to the console window from the module?
stdio.printf isn't linked into the real-time stg module, nor mine.
Including rcs_prnt.hh with rcs_print gives a zillion errors on compile.
For that matter, why when I specific a nonrealtime motion plat,
does it load from the realtime rtlinux_3_0 area?

Second question - I don't have any I/O whatsoever,
yet it appears I have to run bridgeporttask and
minimillio  - which do all sorts of unwanted things.

PARPORT problems:
Well, the PARPORT message I'm had is from insmod:

Script started on Sat Jan 12 22:32:19 2002
root-at-krb-emc:/usr/local/emc:./emc.run

./emc.run: which:: No such file or directory
Current platform is linux_2_2_18
Current real-time platform is rtlinux_3_0
inivar = plat/linux_2_2_18/bin/inivar
INIFILE = emc.ini
starting emc...
/sbin/insmod -f /lib/modules/2.2.18-rtl3.0/misc/rtl.o
insmod: a module named rtl already exists
starting EMC MOTION PROGRAM -- fpgamod.o...plat/rtlinux_3_0/lib/fpgamod.o: symbol for parameter PARPORT_IO_ADDRESS not found
can't install it
emc.ini was not changed.
root-at-krb-emc:/usr/local/emc:exit

This error goes away when PARPORT_IO_ADDRESS is added
to fpga.c, a modified copy of the original stg.c:
unsigned short PARPORT_IO_ADDRESS = 0x278;

And I'm confused because emc.ini specifies a nonrealtime platform,
but it loads from plat/rtlinux_3_0/lib/fpgamod.o.  (I do do both a
"make plat=linux_2_2_18 all" and "make plat=rtlinux_3_0 all" to
build it.)

Now I duplicated Makefile entries for stgmod.o into fpgamod.o;
one example:
# FPGA motion control
$(DEVP_LIB_DIR)/fpgamod.o: \
 $(DEVP_LIB_DIR)/emcmot.o \
 $(DEVP_LIB_DIR)/emcmotglb.o \
 $(DEVP_LIB_DIR)/tp.o \
 $(DEVP_LIB_DIR)/tc.o \
 $(DEVP_LIB_DIR)/trivkins.o \
 $(DEVP_LIB_DIR)/cubic.o \
 $(DEVP_LIB_DIR)/pid.o \
 $(DEVP_LIB_DIR)/extfpgamot.o \
 $(DEVP_LIB_DIR)/fpga.o \
 $(DEVP_LIB_DIR)/mmxavg.o \
 $(DEVP_LIB_DIR)/emcmotlog.o \
 $(DEVP_LIB_DIR)/emcmotutil.o
 ld -r -static \
 $^ \
 $(RCS_PLATLIB)/libpm.a \
 $(RT_MODULE_LIBCM_LINK_FLAG) \
 -o $-at-

Thank you.  --krb
 



Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact