-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.WIN32
181 lines (134 loc) · 6.51 KB
/
README.WIN32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
Compiling EPICS and Building IOC Applications on WIN32 (Windows95/NT)
---------------------------------------------------------------------
Original port of EPICS base to WIN32 (Windows95/NT)
was done by Kay-Uwe Kasemir 11/96
please mail questions, comments, corrections, additional examples, etc
0) what you will get
--------------------
Right now this port of EPICS to WIN32 should allow you to
* compile almost 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.
1) see what you have
--------------------
To compile EPICS on WIN32, we need
WindRiver System's Tornado (used: 1.0) (not required if host only build)
Microsoft's Visual C/C++ (used: 4.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:
** Note that that each "\" in any path variables
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 must be replaced with
a "\ " (this is because GNU make treats all " " separated
input as independent tokens in the input stream.
** WIN32 will generally allow "/" and "\" interchangeably in file paths,
but the DOS shell appears to only accept "\".
Your path should include:
- The EPICS-binaries that we are about to build in <EPICS>base/bin/WIN32
- 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:
HOST_ARCH=WIN32 (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 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
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). I have not so far determined
how to configure visual C++ so that 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 (as is
normally the case in the visual C++ environment). If you solve this problem please
forward the details to [email protected].
Good luck !
-Kay