Moved from $(TOP)

This commit is contained in:
Andrew Johnson
2002-07-16 20:36:07 +00:00
parent 457cdc6f3a
commit 79acc0bfaa
2 changed files with 577 additions and 0 deletions

218
documentation/README.WIN32 Normal file
View File

@@ -0,0 +1,218 @@
Compiling EPICS and Building IOC Applications on win32-x86 (Windows95/NT)
---------------------------------------------------------------------
Original port of EPICS base build system to WIN32 (Windows95/NT)
was done by Kay-Uwe Kasemir 11/96
please mail questions, comments, corrections, additional examples, etc
to johill@lanl.gov
0) what you will get
--------------------
Right now this port of EPICS to win32-x86 should allow you to
* compile all of EPICS base using {Tornado, MS Visual C, perl,
GNU make} (only {MS Visual C, perl, GNU make} if you prefer
to compile only the host portions of EPICS base).
* load EPICS on an IOC (486, pentium, 68k, ...),
load databases
(no drivers/devices for real I/O available, yet.
Some Greenspring IP support [Relay, Dig, ADC, DAC] is in progress)
* build and use ca.dll on NT or Win95 to access all IOCs,
as well as the Com-library, gdd-library, cas-library,
and all other EPICS base libraries as DLLs.
* build gdd, cas and a demo of the new portable CA server on win32-x86.
To build only for win32-x86 and not cross compile for IOC development type
"make win32-x86" or in your configure/CONFIG_SITE file set
"CROSS_COMPILER_HOST_ARCHS="
1) see what you have
--------------------
To compile EPICS on win32-x86, we need
WindRiver System's Tornado (used: 1.0) (not required if host only build)
Microsoft's Visual C/C++ (used: 6.0) (borland C++ rumored to work also)
and some tools:
gnu make - www.gnu.org (we used 3.76)
perl - www.perl.org (we used 5.003)
The perl interpreter and gnu make are available 'on the net'
as sources which compile with MS Visual C++.
If you cannot/don't want to find them, contact me, please!
2) set environment variables
(Setting env. vars. is different: for NT, use Settings/System,
for Win95 use autoexec.bat)
When setting paths in the EPICS CONFIG files for win32-x86 the following
are hints in case you have trouble. You should not need to worry about
this unless you type a path into one of the EPICS config files that
includes a "\". In most situations gnu make, windows NT, the MS compiler,
and the MS linker will accept "/" and this will result in less trouble.
** Note that that each "\" in any path variables you set
must be replaced with a "\\" (this is because GNU make treats
all "\" characters as line continuation)
** Note that that each space in any file name or
path name variable you set must be replaced with
a "\ " (this is because GNU make treats all " " separated
input as independent tokens in the input stream.
** win32-x86 will generally allow "/" and "\" interchangeably in file paths,
but the DOS shell only accepts "\".
** Certain command line utilities such as the MS linker are known to in rare
situations confuse "/" in a path with command line options, and it may
be necessary to replace a "/" in a path that configured with "\\", but
the bulk of our experience indicates that this is not the necessary.
Your path should include:
- The EPICS-binaries that we are about to build in <EPICS>base/bin/win32-x86
- The System (for me it's in NT40...)
- The MS Visual C compiler binaries
Check with e.g.:
>echo %Path%
C:\WINNT35.0\system32;
C:\WINNT35.0;
c:\msdev\bin;
c:\perl5\bin;
c:\make-3.75\WinRel;
c:\epics\base\bin\win32 (really where INSTALL_LOCATION specifies)
On NT, "Path" is defined by the operating system, on Win95, it's "PATH" instead.
MS Visual C and Tornado should be installed properly with
these env. variables set:
WIND_BASE=c:\Tornado (required for cross development only)
WIND_HOST_TYPE=x86-win32 (required for cross development only)
This way the EPICS makesystem can locate Tornado
without any changes to the files in base/config.
So for pc486 the settings in CONFIG_SITE where
you specify the location of VxWorks are ignored,
this information is taken from WIND_BASE and _HOST_TYPE!!
MSDevDir=C:\MSDEV
include=c:\msdev\include;c:\msdev\mfc\include
lib=c:\msdev\lib;c:\msdev\mfc\lib
Select host arch to build:
EPICS_HOST_ARCH=win32-x86 (used by the make system)
Set the "TMP" environment variable if you need to specify where
temporary files are created.
Directory Used For Temporary Files Conditions
---------------------------------- ----------
Directory specified by TMP TMP environment variable is set,
and directory specified by TMP exists.
dir argument to _tempnam TMP environment variable is not set, or
directory specified by TMP does not exist.
P_tmpdir in STDIO.H dir argument is NULL, or dir is name of
nonexistent directory.
Current working directory P_tmpdir does not exist.
On my system I see in stdio.h that _P_tmpdir is "/". Here is a common
setting for "TMP" (the C:\TEMP directory must exist).
TMP=C:\TEMP
3) building EPICS
-----------------
Prepare apx. 2 ltr. Tee and type:
cd <epics>/base
make (use gnu make)
Watch for errors and send them to me.
Known problems:
* gnumake seems to be faster than win32-x86 sometimes
which results in warnings/errors like
"file has modification date in the future"
for newly created things.
Very seldom this is fatal, so you have to
stop gnumake and restart it.
* This is strange because Windows95/NT doesn't care
about upper/lower case:
WIN32 is WIN32, not win32. Gnumake fails
if e.g. base/src/include/os/WIN32 is ...win32.
4) Creating EPICS IOC applications under win32-x86
o create application development folder
o start a DOS window and change your working directory to the folder
created above (with the DOS "cd" command)
o to create an example application type:
"perl c:\epics\bin\win32\makeBaseApp.pl -b c:\\epics -e
** Note that that each "\" above in any path arguments to makeBaseApp.pl
must be replaced with a "\\" (this is because GNU make treats
all "\" characters as line continuation)
** Note that that each space in any file name or
path name argument to makeBaseApp.pl must be replaced with
a "\ " (this is because GNU make treats all " " separated
input as independent tokens in the input stream.
** Note that c:\epics above must be replaced by the path
to your epics source installation (or where INSTALL_LOCATION
specifies)
o General information on EPICS IOC application development can be found in
the "EPICS IOC Application Developers Guide". To see all of the options
supported by makeBaseApp.pl type "perl c:\epics\bin\win32\makeBaseApp.pl"
5) EPICS GNU make makefiles can be executed from within a Visual C++ "makefile"
style project. This allows EPICS programs to be developed directly inside of
the visual C++ environment. To do this create a "makefile" project and place your
gnu make command in the build configuration (accessed from the project/settings menu).
You will also need to add GNU make and <EPICS>/bin/win32 into the Visual C++
executable search path (from the tools/options menu).
In visual C++ it is possible to double click on the compiler
error messages generated within an EPICS "makefile" style project and have visual
C++ immediately position the cursor on the corresponding line in the source. I
have found that this works correctly with Makefile projects if the project is in a
directory just below the source code. The following build command works well
in a visual C++ make file project: "kill caRepeater.exe&make -C ..". Be careful
not to introduce additional spaces around the &. The kill.exe command is in the
NT resource kit.
6) Issues that you should be aware of if you are building code that
calls EPICS, but you are not using the EPICS build system.
6a) You will need to include header files from the following paths.
<epics>\base\include
<epics>\base\include\os\win32
6b) You will need to link with the following path in effect.
<epics>\base\lib\win32-x86.
6c) If the visual C++ /Za option is not used then you will also need to define
__STDC__ to be zero on the command line so that EPICS headers will know that
a ANSI standard C compiler is in use.
6d) If you link with EPICS object libraries then specify /MT or /MTd
depending on whether EPICS base and your code are built for debugging.
This specifies the multithreaded operating environment required by EPICS.
This will also not define _DLL and therefore the EPICS header files will
not specify that sharable libraries are being called. EPICS object library
names follow the convention "xxxObj.lib".
6e) If you link with EPICS shareable libraries (with DLLs) then you must
use /MDd or /MD depending on whether EPICS base and your code are
built for debugging. This specifies the multithreaded operating environment
required by EPICS. This will also define _DLL and therefore the EPICS header
files will specify an optimized calling convention for shareable libraries.
EPICS shareable libraries (DLL) names follow the convention "xxx.lib"
and "xxx.dll".

View File

@@ -0,0 +1,359 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>EPICS Release baseR3.14 </title>
</head>
<body lang="en">
<center>
<h1>EPICS Release base 3.14.0beta2</h1>
<h1>MMM DD 2002</h1>
</center>
<h2>Changes since beta1</h2>
<p><strong>recGblGetTimeStamp</strong></p>
<p>If TSE is -1 then recGblGetTimeStamp does not retrieve time. This allows device/driver support to set the time.</p>
<p><strong>aiRecord and aoRecord: Setting eoff=egul</strong></p>
<p>Instead of init_record executing code like</p>
<pre> if ((pai-&gt;linr == menuConvertLINEAR) &amp;&amp; pdset-&gt;special_linconv) {
pai-&gt;eoff = pai-&gt;egul;
}
</pre>
<p>It now executes:</p>
<pre> if ((pai-&gt;eslo==1.0) &amp;&amp; (pai-&gt;eoff==0.0)) {
pai-&gt;eoff = pai-&gt;egul;
}
</pre>
<p>aoRecord has a similar change</p>
<p><strong>CA puts to disabled record</strong></p>
<p>If a CA client issues a put to a disabled record then, when the record is ena
bled, database puts to the record will not make the record process until a CA pu
t is again issued. This is fixed.</p>
<p><strong>TPRO - trace processing</strong></p>
<p>If dbProcess is called recursively by different tasks, it did not properly
handle TPRO. Consider the following database:</p>
<pre>record(ao,"mrkao") {
field(OUT,"mrkai CA")
field(TPRO,"1")
}
record(ai,"mrkai") {
field(TPRO,"1")
}</pre>
<p>If a channel access put is sent to mrkao, no message is issued when mrkai
is processed.</p>
<p>This is now fixed.</p>
<p><strong>TSconfigure</strong></p>
<p>If in your st.cmd file you issue the command.</p>
<p>TSconfigure(0,0,0,0,0,0,1)</p>
<p>And set the TSE field of any record to a non zero value, then a crash will
occur when recGblGetTimeStamp is called.</p>
<p>This is now fixed.</p>
<p><strong>calcoutRecord</strong></p>
<p>nsev not sevr must be checked to decide if dbPutLink should be called.</p>
<p><strong>dbCa</strong></p>
<p>Whenever a connection is made, a request to retrieve the control, display,
and alarm linits and the precision and units is automatically issued.
Previously this was only done if dbCaGetAttributes was called. This it is no
longer necessary to call dbCaGetAttributes.</p>
<p><strong>calcPerform</strong></p>
<p>This now returns a non zero value if the result is nan (not a number).</p>
<p><b>Record Name Length</b></p>
<p>The size of the name field has been expanded from 29 to 61, i.e. record
names can now have 60 characters.</p>
<p><b>iocInit</b></p>
<p>initialProcess is now called before interruptAccept. This means that
initial processing will be done before periodically scanned and I/O Inter
scanned records start processing.</p>
<p><b>ellLib</b></p>
<p>Casts have been removed that suppressed valuable error messages</p>
<p><b>mbbiRecord</b></p>
<p>All existing manipulations of UDF in process() are removed and udf is set
FALSE when the raw value is successfully read.</p>
<p><b>selRecord</b></p>
<p>In do_sel udf is not set false at the beginning. If selm has an invalid
value recGblSetSevr(psel,SOFT_ALARM,MAJOR_ALARM) is called.</p>
<p><b>cdCommands file</b></p>
<p>Fixed a bug and revised the use of the IOCS_APPL_TOP setting in an
application's <top>/configure/CONFIG file (which specifies the path to
<top>as seen by the IOC) to apply the same modifications to all paths output
in the cdCommands file.</p>
<h2>Changes since alpha2</h2>
All changes for release 3.13.5 that also apply to 3.14 have been made.
<p><b>devAiSoftRaw and devAoSoftRaw</b></p>
<p>A new state is defined for the LINR field. The name is "SLOPE", which
allows any device type to be used with manual settings of the EOFF and ESLO
fields. With this setting, the device support's special_linconv() routine is
only called when LINR=LINEAR.</p>
<p>The RTEMS TFTP remote filesystem driver now supports a limited form of the
chdir() system call. One restriction is that all pathnames passed to chdir()
must end in a / character, so IOC shell commands to change directories must
be given as</p>
<p>cd ../db/</p>
<center>
<h1>EPICS Release base 3.14.0alpha2</h1>
</center>
Since the alpha1 release some major changes were made to the build system, to
some of the libCom facilities, and to the iocsh facilities.
<p>The unbundled version of the sequencer has been build and tested with this
release. You must obtain a version of the sequencer that has been built
against alpha2.</p>
<p>A verion of the HPlanGpib support has been built and tested with this
release. Again you must obtain a version that builds with alpha2.</p>
<p>A new update to the Application Developer's Guide is available for this
release.</p>
<h3>Build changes</h3>
<ul>
<li>Operating system independant builds are now done in an O.Common
subdirectory and then installed instead of being performed directly in an
install directory.</li>
<li>Build definition names (e.g. RECTYPES, MENUS, DBDNAME, and BPTS) have
been changed to specify the name of the file to be created and installed
instead of the source file name.</li>
<li>All db and dbd related definitions and rules have been moved into
base/configure/RULES.Db file. The rules now allow multiple dbd files and
registerRecordDeviceDriver files to be created in a single Makefile.</li>
<li>"gnumake depends" no longer depends on a complete buildInstall.</li>
</ul>
<h3>Converting alpha1 applications to alpha2</h3>
Build modifications in alpha2 require the following changes to existing R3.14
applications.
<ul>
<li> Remove the now unused RULES files</li>
<li><ul>
./configure/RULES.Db <br>
./configure/RULES.registerRecordDeviceDriver <br>
 </ul>
</li>
<li>Delete the following line in ./configure/RULES
<ul>
  <br>
include $(TOP)/configure/RULES.registerRecordDeviceDriver</ul>
</li>
</ul>
<ul>
<li>  In &lt;top&gt;/configure/Makefile change
<ul>
  <br>
@$(PERL) $(TOOLS)/makeConfigAppInclude.pl $(T_A) $@ $(TOP)</ul>
</li>
to
<ul>
@$(PERL) $(TOOLS)/makeConfigAppInclude.pl $(EPICS_HOST_ARCH) $(T_A) $@
$(TOP) <br>
 </ul>
and add the line
<ul>
  <br>
depends: install <br>
 </ul>
to the bottom of the Makefile.
<ul>
 </ul>
</ul>
<ul>
<li>In all *App/*Db/Makefileschange
<ul>
  <br>
include $(TOP)/configure/RULES.Db</ul>
</li>
to
<ul>
include $(TOP)/configure/RULES</ul>
<li>In all *App/src/Makefile files
<ul>
 </ul>
</li>
change    DBDNAME = &lt;name&gt;App    to    DBD += &lt;name&gt;
<ul>
 </ul>
and remove the line <br>
 
<ul>
DBDEXPAND = &lt;name&gt;Include.dbd <br>
 </ul>
NOTE: If any of your *App/*Db/Makefiles contain "DBDNAME =" lines you
should make these same changes in that *Db dirctory. <br>
 
<ul>
<li>In all *App/src/Makefile Makefiles</li>
</ul>
<ul>
 </ul>
change    RECTYPES=&lt;name&gt;.h    to    DBDINC+=&lt;name&gt;
<ul>
 </ul>
change    MENUS=&lt;name&gt;.h    to        DBDINC+=&lt;name&gt;</ul>
<ul>
change    BPTS     to     DBD
<p>change     INSTALLDB     to    DB</p>
<p>change    DBDINSTALL    to     DBD <br>
 </p>
<li>In all example *App/src/Makefile files change
<ul>
  <br>
example_SRCS_DEFAULT += registerRecordDeviceDriver.c</ul>
</li>
to
<ul>
example_SRCS_DEFAULT += &lt;name&gt;_registerRecordDeviceDriver.cpp <br>
 </ul>
where &lt;name&gt; is the base name of a &lt;name&gt;.dbd file which was
created from a &lt;name&gt;Include.dbd file and which will be loaded in a
st.cmd or stcmd.host script (e.g. example). <br>
 
<ul>
<li>In ./iocBoot/ioc&lt;name&gt;/st.cmd files change</li>
</ul>
<br>
 
<ul>
dbLoadDatabase("dbd/exampleApp.dbd")</ul>
to
<ul>
dbLoadDatabase("dbd/example.dbd") <br>
 </ul>
<li>In &lt;top&gt;/iocBoot/ioc&lt;name&gt;/stcmd.host files change
<ul>
  <br>
dbLoadDatabase("../../dbd/exampleApp.dbd",0,0)</ul>
</li>
to
<ul>
dbLoadDatabase("../../dbd/example.dbd",0,0)</ul>
</ul>
<h3>EPICS_HOST_ARCH changes</h3>
GNU compiler builds are now determined by the value of EPICS_HOST_ARCH and
are no longer specified in CONFIG_SITE.  All references to the ANSI (ACC/GCC)
and CPLUSPLUS (CCC/G++) macros have been removed. <br>
 
<h3>libCom</h3>
Most of the library routines and files starting with the prefix osi have been
changed to start with epics. Several also had major changes to their user
interface. See the latest version of the Application Developer's Guide for
details. <br>
 
<center>
<h2>EPICS Release base 3.14.0alpha1 Notes</h2>
</center>
<p><br>
</p>
<p>This is the first release of 3.14. This is the first release that supports
iocCore on platforms besides vxWorks.</p>
<p>iocCore is now supported on the following platforms:</p>
<ul>
<li>vxWorks</li>
<br>
Tornado II is required.
<ul>
<li>RTEMS</li>
</ul>
<br>
An open source real time operating system. It has been tested on MVME167
and MC68360 processors. RTEMS also supports powerPC.
<ul>
<li>solaris</li>
</ul>
<br>
Has been tested on solaris 2.6 and solaris 8 with Sun workshop 6.0 (C++
5.2). Sun workshop 5.0 (C++ 5.0) will not compile this version of EPICS.
<ul>
<li>Linux</li>
</ul>
<br>
Has been tested on Redhat x86 platforms.
<ul>
<li>winNT</li>
</ul>
<br>
Testing has been done with visual C++ 6.0.</ul>
A new version of the Application Developers Guide is available. The following
gives links to the new Application Developer's Guide and to RTEMS information.
<p>http://www.aps.anl.gov/epics/modules/base/R3-14.php</p>
<p>Most of the Application Developer's Guide has only minor changes. The
following are new.</p>
<ul>
<li>Chapter 2 describes the new features for 3.14.</li>
<li>Chapter 4 describes the build facility for 3.14</li>
<li>Chapters 19 and 20 describe libCom, which was not previously
documented.</li>
</ul>
<p><br>
It must be emphasized that this is an alpha release.</p>
<ul>
<li>Please don't use it for existing operational systems</li>
<li>Don't build your operational CA clients with it.</li>
<li>The APIs for new components in libCom are still evolving so if you use
them be prepared for changes.</li>
<li>HPUX - No support currently because we could not find good support for
multithreading.</li>
</ul>
Building Applications
<ul>
<li>For new applications see Chapters 2 (New Features) and Chapter 4 (Build
Facility) of the Application Developer's Guide.</li>
<li>For existing applications the old config rules are still supported.
Some changes, however, are needed. Documentation is being prepared and
will appear in these release notes sooon.</li>
</ul>
</body>
</html>