Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.naic.edu/~phil/hardware/vertex/sharemegsvertex/Doc/Readme
Дата изменения: Thu Jan 31 22:05:14 2002
Дата индексирования: Thu Jan 15 06:30:20 2009
Кодировка:

Поисковые слова: п п п п п п п п п
vertex notes: this file:/share/megs/vertex/Doc/Readme
lastmod : 31jan02

--------------------------------------------------------------------------------
directories:

/share/megs/vertex: base directory for vertex software on the sun

./Doc - holds some notes (including this file)

./lcu - lcu software
./Doc - some documentation
./pcr - pc root directory. includes everything on hard disc
pc format
./Sun - some include files to allow compiling code on the sun for
testing
./user - Holds the source code subdirectories for the lcu main1 prog.
./v2_0d - version 2.0d till 06mar01
./v2_2 - version 2.2 06mar01 ->
./Dos - copy of source code to copy to floppy for dos
./Sun - source code for main1 program. Do edit in this
directory.
./ocu - ocu software

./floppy_bkup - backups off floppies left by klaus 06mar01
./docs - gregorian drive system documentation
issue 1999-12-13 (word format).
./plcv2_2 - plc v2.2 2001-03-06 and labtest version based on v2.2
2001-03-06
./plcv2_0c - v2.0c of plc code 1999-12-21
./lcuosd_ea11 - lcu software s/w v2.2 slow 25mhz silicon disc
./lcuosd_ed14 - lcu software s/w v2.2 fast 133Mhz silicon disc
./lcuv2_2 - lcu software s/w v2.2 2001/3/5
./ocuv2_2 - ocu software s/w v2.2 2001/3/5

--------------------------------------------------------------------------------
lcu directories: /share/vertex/lcu/

user : this has the source code for the lcu pointing program.
There are subdirectories for each version.
./user/v2_0d
./lcu/user/v2_2
./lcu/user/new - version v2_0d with structures converted to
bit fields. need to finish then adde v2.2
mods

The source is stored in sun format in the Sun directory and
in dos format (with the cr) in the Dos directory. The master
directory is always the Sun directory so make your edits here
then do make unix2dos.

pcr : this is a copy of the lcu pc root directory. It was copied
from the 25Mhz lcu 06mar01. The only modifications are in
AUTOEXEC.BAT (probably boots from test instead of v2_2)
and the file PCTCP\PCTCP.INI.
for production work
copy PCTCPDEF.INI to PCTCP.INI. The current PCTCP.INI is a copy
of PCTCPFTP.INI that lets you run ftp in the lab with the ao
ethernet addreses.
If you want to look at autoexec.bat or config.sys look
here.

Doc : misc notes on things.

--------------------------------------------------------------------------------
How to edit and recompile code for the lcu..

Edits should be done on the sun in the Sun directory:
eg vertex/lcu/user/v2_2/Sun
This will insure a single location for the source code. You can then
distribute it to the various pc discs: 2 hard discs and 3 onboard silicon
discs. If edits are done on the pc discs then you'd never be sure that
the pc disc you were looking at had the latest version.

Suppose you want to edit main1.c in version v2.2 on the sun.

1. from this directory
cd vertex/lcu/user
cd v2_2
cd Sun
vi main1.c
make your changes

make .. this will compile everything on the sun to check
any compile errors.

make unix2dos .. this will move it to the Dos directory with .
- This is just the source code.

2. To move this source code to the lcu..

a. find a solaris machine with a floppy.
b. insert the floppy
c. volcheck .. system mounts floppy at /floppy/floppy0
d. fdformat -v -U -d -b "label" this will format a 1.44 mb floppy with
an msdos filesystem.
e. volrmmount .. remounts the floppy

f. in directory vertex/lcu/user/v2_2/Dos
cp -p * /floppy/floppy0
g. take floppy to the lcu and insert it.
on hard disk
c:\user\lcu\test (or wherever you want to put it)
copy a:\*.* c:\user\lcu\test

h. then in c:\user\lcu\test
make .. this compiles and links everything
other macros.bat are:
cc filename .. will compile a single program
ld .. this will relink all the objects.
asm filename .. this assembles an individual routine.

i. To run the test version..
edit c:\autoexec.bat
at the bottom where it has
cd \user\Lcu
cd v2_2
..comment out
rem cd v2_2
.. and add
cd test

now reboot the compute and go to lan.

j. be sure and update the autoexec.bat to put it back to the
production version when you are done.

k. If this is to be the new production code you may want to create
a new subdir v2_3 or whatever and update the autoexec.bat to
run main1 from here.

l. You also might want to copy the directory with the
compiled object (eg c:\user\Lcu\v2_3) to a floppy so you can put it
under vertex/lcu/pcr/v2_3 on the sun
You need to distribute the new version to all 5 pc discs (2 hard discs
and 3 silicon discs).

3. If you are creating a new version.
On the sun
cd vertex/user
mkdir v2_3 for example
cp Makeinclude v2_3
cd v2_3
mkdir Sun
mkdir Dos
copy the base code from the previous version ..
cp vertex/user/v2_2/Sun/* vertex/user/v2_3
then make your edits...

--------------------------------------------------------------------------------
Misc.

0. conifg.sys , autoexec.bat
has a menu choice for dos,lan. The environment variable
config is set and then passed to autoexec.bat. It then determines
what drivers are loaded and how the environment is setup.

lan: loads the cp581 drivers, ethernet, goes to lan directory
and executes inicom2 (setup the serial port for ocu) and
then main1 (the main program).
dos: sets the path,lib for the compilers to work. loads the ethernet
driver (for ftp) and then starts norton commander (f10 will quit it).

When using the lan option (onlin) check that the autoexec.bat on the disc
you are using (osd or hard disc). Make sure that the
path for the main1 program is c:\user\lcu\v2_2 (or whatever the current
version is and not c:\user\lcu\test for the test version.

1. to switch between the onboard silicon disk and the hard disc

- new (fast lcu's).
ctrl-alt-esc on bootup to go into setup.
goto disc menu
disable autodetect of hard disc
continue booting...
run savecmos c:\cmos.init

To switch back to hard disc and silicon disc just select
autodetect in the disc menu.

- on old lcu
ctrl-alt-esc
drive:C IDE ...
drive:D OSD ...

Use + to increment drive:C ide to osd
use + to increment drive:D osd to NONE

then f5 save

to go back, ctrl-alt-del and use - to reset drive:C drive:D
f5 to save.

Klaus said that the savecmos does not work with the old lcu.

2. escaping from main1 while running.
enter vertex
it will bring you back to dos.

3. starting main1.
If you select dos. then try to manually start inicom2,main1
then it won't work since the cp581 drivers aren't loaded in the
autoexec.bat when dos is selected.
4. timeouts..
a.On bootup the plc times out the communications after 60 seconds.
b.The lcu opens 3 files on the dual port memory interface
for 3 separate db's 221,222,223. Each of these open calls will
timeout in 30 seconds if the plc is not there. If any of these
calls timeout, the lcu will not be able to communicate with these
portion of the communications data. It only tries the open once.
After 3 timeouts, main1 drops into the main loop but it will
fail on every read from the the file descriptor that failed on
open.
c. To communicate with the plc, the lcu boot sequence must go through
the lan option. The dos option does not load the drivers for the
communications (done in autoexec.bat).
d. Once the plc has synchronized, you can stop the main1 program and
restart without any problems. This is probably because the
s5remote driver that handles the comm. is still running (as a tsr).
e.

--------------------------------------------------------------------------------
Some gotcha ya's

1. code doesn't seem to boot up right after you've been changing things.
- make sure the autoexec.bat is running initcom2 and main1 from the
correct directory. someone may have left it pointing at the test
directory.

- someone in the lab switched the file \pctcp\pctcp.ini so you could
do ftp in the lab on ao net.
just
copy \pctcp\pctcpdef.ini \pctcp\pctcp.ini
or look under vertex/pcr/pctcp/pctcpdef.ini on the sun.

2. the fast lcu's have a problem losing the bios numlock and date when
they lose power. After changes to the cmos (via the setup program)
you must run the program:
savecmos c:\cmos.ini

The autoexec.bat will then execute the line initcmos c:\cmos.ini
to initialize the cmos on each bootup. (6mar01 this looks like it
is jumped around or commented out..).
the source for these programs are in pcr/osd/5810ed14/xxx

note:07mar01. looks like initcmos command is placed after the
got %config% in autoexec.bat so it is never
being executed anyway.

3. The autoexec.bat's, config.sys are not the same for the osd and the
hard disk. The old and new lcu probably have some changes too
since the cmos is saved in one and not the other.
Look in the pcr/osd/xxx for the osd versions and
pcr/ for the harddisk versions.

4. The ocu code is compiled with the microsoft 5.1 version compiler
it has the compiler and assembler as separate program.s
The lcu is compiled with the microsoft 6.0 compiler. The assembler
and compiler are integrated into one program.
--------------------------------------------------------------------------------