REKLAB manual (SERVO CONTROL - ak)

Procedures for C code compilation

 

PLEASE READ THE ENTIRE FILE BEFORE YOU START COMPILING YOU CODE

Before continuing, you have to make sure that the PC is turned ON and that it is in the "transputer" config (i.e.: running the PCSERVER), that you have written a C code for the controller, and that you have generated a configuration description file as described in the previous section before you can proceed.

There is a new account called "inmos". In order to login to the account you have to remote login to ralph and use the name "inmos" as the login name.

rlogin ralph -l inmos

The system will prompt you for the password. In order to get it, please contact R.E. KEARNEY at:

rob@hankle.biomed.mcgill.ca

The .profile file in the account defines some useful aliases and a PATH to all the transputer files. The files that were originally on the PC, live now in the "control" directory.

The Makefile located in the "control" directory, is the master file which does everything; the only section that has to be modified is the one just BEFORE the folded one ("APPLICATION-SPECIFIC"), and it should work.

The Makefile is run in one of the following ways:

"make" - make the bootable file; this thing makes dependencies automatically

"make run" - does the above, if not already done, and then runs the bootable file on the transputer.

"make depend" - generates dependencies. This is called automatically when the bootable file is generated.

"make edit" - fires up emacs with all of the related source files, the makefile and the .cfs (configuration script) file. This is the recommended way of editing the program, because it also auto-generates the emacs TAGS list, which is a very neat little feature. (See emacs manual for more info)

"make print" - generates a postscript file of all the RECENTLY EDITED source files, makefile, and .cfs file (if the postscript file didn't exist, all of the above sources will be included in it). The .ps file is then sent to the laser printer.

"make sources.ps" - as above, but doesn't send to printer.

"make clean" - call this when something goes wrong and you want to re-start the compilation. Deletes all of the object files, linked units, bootable code, and other goodies like puddles made by coredumps...

"make veryclean" - as above, but also deletes the dependency list

For further information, please refere to the GNU MAKE manual.

There is still ONE problem that must be figured out; when there are multiple LKUNITS (see Makefile), the programs tends to run icc+ilink fine for the first file, but then ilink fails for the second file in the list.

For example:
if LKUNITS = wan too free
make will run: (this is a SIMPLIFIED output, but shows the essentials)
-> icc sources/wan.c -o tco/wan.tco
-> ilink tco/wan.tco -o lku/wan.lku
-> icc sources/too.c -o tco/too.tco
-> ilink too.tco -o lku/too.lku

The problem is that the second link to "ilink" doesn't expand the path to too.tco correctly. One way to get around this is to re-run "make" after it fails; the second time, it will run the file correctly, and promptly crash AGAIN, but for the NEXT file in the list (in this case, for free,tco). Run it as many times, until the entire thing is complete.

GOOD LUCK

Back

Servo Control

Last modified: Wed Sept 25 11:34 AM 1996