File: 99250-VxWorksPlatformNotes.page

package info (click to toggle)
poco 1.10.0-6%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 50,624 kB
  • sloc: cpp: 301,905; ansic: 192,793; makefile: 1,429; sh: 493; xml: 65; perl: 29
file content (233 lines) | stat: -rw-r--r-- 7,231 bytes parent folder | download | duplicates (4)
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
POCO C++ Libraries VxWorks Platform Notes
AAAIntroduction

!!!Introduction

Starting with release 1.4.1 the POCO C++ Libraries can be used on 
VxWorks 5.5.1 and newer. Project files for Tornado are provided that
support debug and release builds using the Diab C++ compiler.


!!!Requirements

!!Compiling the POCO C++ Libraries

When compiling the POCO C++ Libraries for a VxWorks target, as well as
when including POCO C++ Libraries headers in a project for a VxWorks
target, the preprocessor macro <[POCO_VXWORKS]> must be defined. This is
because the Diab C++ compiler does not provide a predefined macro that
allows for reliable detection of a VxWorks target. 


!!VxWorks OS Libraries

The following VxWorks OS libraries are required and must be
available on the target:

  - ansiTime
  - clockLib
  - cplusLib
  - dirLib (for Poco::File and Poco::Environment)
  - envLib (for Poco::Environment)
  - ftruncate (for Poco::File)
  - hostLib (for Poco::Environment)
  - ifLib
  - inetLib
  - ioLib
  - loadLib (for Poco::SharedLibrary)
  - moduleLib (for Poco::SharedLibrary)
  - netLib
  - pthreadLib
  - resolvLib
  - sockLib
  - symLib (for Poco::SharedLibrary)
  - timerLib
  - unldLib (for Poco::SharedLibrary)

Some OS libraries can be omitted if the POCO class requiring it
(given in parenthesis) is not used.


!!!Restrictions

!!Poco::Environment

  - Poco::Environment::nodeName() returns the result of gethostname(); the host name
    can be set with sethostname().
  - Poco::Environment::processorCount() always returns 1.
  

!!Date/Time Support

  - Timezone support requires that the <[TIMEZONE]> environment
    variable is set accordingly on the target.
  - Poco::Timezone::name(), Poco::Timezone::standardName() and
    Poco::Timezone::dstName() all return the same value -- the
    timezone name specified in the <[TIMEZONE]> environment variable.


!!Poco::File

  - Poco::File::canRead() and Poco::File::canWrite() always return
    true. Poco::File::canExecute() always returns false, as does
    Poco::File::isLink(). 
  - Poco::File::isHidden() works the same as on Unix platforms
    (files with names starting with a period are considered hidden).
  - Poco::File::setWriteable() and Poco::File::setExecutable()
    are no-ops.


!!Poco::Path

Poco::Path::home() returns the value of environment variable <[HOME]>, if defined,
or else the root directory path ("/").
  

!!Poco::FPEnvironment

The Poco::FPEnvironment class is not available on VxWorks and
cannot be used.
    
    
!!Poco::Process, Poco::Pipe, Poco::SharedMemory, Poco::NamedEvent, Poco::NamedMutex

VxWorks does not support processes and POCO makes no attempt
to hide this fact. Poco::Process, Poco::Pipe (and related stream classes), 
Poco::SharedMemory, Poco::NamedEvent and Poco::NamedMutex are not available on VxWorks.


!!Poco::RWLock

On VxWorks, Poco::RWLock is an ordinary mutex.


!!Poco::SharedLibrary

Symbol lookup (Poco::SharedLibrary::hasSymbol() and Poco::SharedLibrary::getSymbol()) is
slow, as the entire symbol table has to be searched sequentially (using symEach()) 
to find a symbol defined in a specific module.


!!Poco::UnicodeConverter

Poco::UnicodeConverter is not available on VxWorks because VxWorks does
not support std::wstring.


!!Poco::Util::Application

The macro <[POCO_APP_MAIN]> defines a function 

    int pocoAppMain(const char* appName, ...);
----

with a variable number of arguments. The first argument specifies the
name of the application and is equivalent to argv[0]. The remaining
arguments of type <[const char*]> specify command-line arguments. The
list of command-line arguments must be terminated by a NULL argument.


!!Poco::Util::ServerApplication

An application waiting in Poco::Util::ServerApplication::waitForTerminationRequest()
can be shut down by calling Poco::Util::ServerApplication::terminate().

The macro <[POCO_SERVER_MAIN]> defines a function 

    int pocoSrvMain(const char* appName, ...);
----

which works in the same way as <[pocoAppMain()]>, defined by <[POCO_APP_MAIN]>.


!!Crypto and NetSSL

Crypto and NetSSL_OpenSSL are currently not supported.


!!Data

Only the SQLite backend is currently supported.
Before building Data/SQLite for a VxWorks 5.5.1 target,
the patch in <*$POCO_BASE/patches/VxWorks/sqlite3.c.patch*>
must be applied by executing

    $ patch -p0 <patches/VxWorks/sqlite3.c.patch
----

in a Unix/Linux or Cygwin shell (from the
<*$POCO_BASE*> directory). The patch is for
SQLite 3.7.4 and may not work with other releases.


!!!Build Notes

!!Generating Tornado 2.2 Project Files

The POCO C++ Libraries source code package does not contain
project files for Tornado. However, a Bash shell script is provided that
will generate the project files (.wpj). On Windows, a Cygwin installation
is required to run this script. Project files are
generated from VxWorks build description files (<**.vxbuild*>),
which are present in all library directories (<*$POCO_BASE/Foundation*>,
<*$POCO_BASE/XML*>, etc.) of libraries that are available on VxWorks. Also 
required are build configuration files that specify the build settings 
for a specific target architecture. These are located in 
<*$POCO_BASE/build/vxconfig*>. To generate
a Tornado project file, run the <[vxprogen]> script from the
respective directory and pass the name(s) of the desired build configuration
as argument(s), e.g.:

    $ cd Foundation
    $ ../build/script/vxprogen PPC440diab_release

A new directory named <*vx*> will be created, containing the
generated Tornado project file. The project file can be
opened in Tornado, and a build can be started.

!!Testing

Every testsuite exports a global function that runs the tests,
similar to what the <*testrunner*> command does on Unix/Linux
systems. For example, to invoke the Foundation testsuite on
the target (using the host-based shell), first load the necessary modules:

    => ld <p:/poco-1.4/CppUnit/vx/PPC440diab_debug/cppUnit.out
    Loading p:/poco-1.4/CppUnit/vx/PPC440diab_debug/cppUnit.out \
    value = 13481712 = 0xcdb6f0
    => ld <p:/poco-1.4/Foundation/vx/PPC440diab_debug/pocoFoundation.out
    Loading p:/poco-1.4/Foundation/vx/PPC440diab_debug/pocoFoundation.out -
    value = 13294784 = 0xcadcc0
    => ld <p:/poco-1.4/Foundation/testsuite/vx/PPC440diab_debug/FoundationTestSuite.out
    Loading p:/poco-1.4/Foundation/testsuite/vx/PPC440diab_debug/FoundationTestSuite.out -
    value = 51068280 = 0x30b3d78
----

Then, if the testsuite does file I/O, set the target's current directory
to the testsuite directory:

    => @cd "/tgtsvr/poco-1.4/Foundation/testsuite"
----

It's also a good ideal to redirect the standard output to the
system console (serial port) with:

    => ?shConfig SH_GET_TASK_IO off
----

Then, the testsuite can be started:

    => FoundationTestSuiteRunner "-all"
----

The arguments passed to the FoundationTestSuiteRunner
(or any other testsuite runner) function are the same
as the ones passed to the <*testrunner*> command:
one or more test/testsuite names, "-all" to run all
tests, or "-print" to print all test/testsuite names.

!!Reference System

The reference system used for testing is an
AMCC Canyonlands evaluation board
(EV-460EX-KIT-05) running VxWorks 5.5.1.