comparison packages/compat/uitron/current/include/pkgconf/uitron.h @ 0:3111d98ba7b3 ecos-v1_1-release

Initial commit of eCos version 1.1
author jlarmour
date Tue, 11 May 1999 11:16:07 +0000
parents
children 443894e2e912
comparison
equal deleted inserted replaced
-1:000000000000 0:3111d98ba7b3
1 #ifndef CYGONCE_PKGCONF_UITRON_H
2 #define CYGONCE_PKGCONF_UITRON_H
3 //===========================================================================
4 //
5 // pkgconf/uitron.h
6 //
7 // uITRON configuration file
8 //
9 //===========================================================================
10 //####COPYRIGHTBEGIN####
11 //
12 // -------------------------------------------
13 // The contents of this file are subject to the Cygnus eCos Public License
14 // Version 1.0 (the "License"); you may not use this file except in
15 // compliance with the License. You may obtain a copy of the License at
16 // http://sourceware.cygnus.com/ecos
17 //
18 // Software distributed under the License is distributed on an "AS IS"
19 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
20 // License for the specific language governing rights and limitations under
21 // the License.
22 //
23 // The Original Code is eCos - Embedded Cygnus Operating System, released
24 // September 30, 1998.
25 //
26 // The Initial Developer of the Original Code is Cygnus. Portions created
27 // by Cygnus are Copyright (C) 1998 Cygnus Solutions. All Rights Reserved.
28 // -------------------------------------------
29 //
30 //####COPYRIGHTEND####
31 //===========================================================================
32 //#####DESCRIPTIONBEGIN####
33 //
34 // Author(s): hmt
35 // Contributors: hmt
36 // Date: 1998-03-16
37 // Purpose: uITRON configuration file
38 // Description:
39 //
40 //####DESCRIPTIONEND####
41 //
42 //===========================================================================
43
44 // The layout of the uITRON Compatibility layer source code is documented in
45 // .../<REPOSITORY>/compat/uitron/<VERSION>/include/uit_func.h
46
47
48 // First get external global configuration in force:
49 #include <pkgconf/kernel.h>
50
51 // The basic question: is the uITRON package provided at all?
52
53 #ifdef CYGPKG_UITRON
54
55 /* ---------------------------------------------------------------------
56 * Define an overall package for the UITRON Compatibility layer. Then
57 * create additional packages for the various different UITRON's currently
58 * available.
59 *
60 * Thought: Can we get a real 'mu' out of this in uITRON throughout?
61 * It's \265 in C strings, in iso_8859_1
62 *
63 *
64 * {{CFG_DATA
65 cdl_package CYGPKG_UITRON {
66 display "eCos uITRON Compatibility Layer"
67 type boolean
68 requires CYGPKG_KERNEL
69 description "eCos supports a uITRON Compatibility Layer, providing
70 full Level S (Standard) compliance with Version 3.02 of
71 the uITRON Standard, plus many Level E (Extended) features.
72 uITRON is the premier Japanese embedded RTOS standard."
73 doc ref/ecos-ref/micro-itron-api.html
74 }
75
76 }}CFG_DATA */
77
78 // ------------------------------------------------------------------------
79 // Conformance check
80 // ------------------------------------------------------------------------
81 /* {{CFG_DATA
82 cdl_option CYGIMP_UITRON_STRICT_CONFORMANCE {
83 display "Check Strict uITRON Standards Conformance"
84 parent CYGPKG_UITRON
85 type radio
86 description "Require the rest of the system configuration
87 to match the needs of strict uITRON standards conformance.
88 This option can only be set if the rest of the system is
89 configured correctly for uITRON semantics, for example
90 there must be a realtime clock, a suitable scheduler, and no
91 timeslicing.
92 Of course a system without this selected can be completely
93 conformant; this is here to help you check."
94 doc ref/ecos-ref/micro-itron-api.html
95 requires CYGVAR_KERNEL_COUNTERS_CLOCK
96 requires CYGSEM_KERNEL_SCHED_MLQUEUE
97 requires !CYGSEM_KERNEL_SCHED_TIMESLICE
98 requires CYGFUN_KERNEL_THREADS_TIMER
99 }
100 cdl_option CYGIMP_UITRON_LOOSE_CONFORMANCE {
101 display "System configuration overrides uITRON"
102 parent CYGPKG_UITRON
103 type radio
104 description "Do not require the rest of the system configuration
105 to match the needs of strict uITRON standards conformance.
106 For example a bitmap scheduler, or timeslicing, can be used
107 with the uITRON functions, but such an environment is not
108 strictly conformant with the uITRON specification.
109 Of course a system with this selected can be completely
110 conformant; but it is up to you to configure it correctly."
111 doc ref/ecos-ref/micro-itron-api.html
112 }
113 }}CFG_DATA */
114 #undef CYGIMP_UITRON_STRICT_CONFORMANCE
115 #define CYGIMP_UITRON_LOOSE_CONFORMANCE
116
117 // ------------------------------------------------------------------------
118 // uITRON FUNCTION CALLS
119 // ------------------------------------------------------------------------
120
121 // If compiling with a C++ compiler, uITRON functions can be inline:
122 // define this to make it so.
123
124 /* {{CFG_DATA
125 cdl_option CYGIMP_UITRON_INLINE_FUNCS {
126 display "Inline Functions"
127 parent CYGPKG_UITRON
128 type boolean
129 description "If compiling your application with a C++ compiler,
130 uITRON functions can be inline: set this to make it so.
131 Inlining functions often increases execution speed,
132 though possibly at the cost of a larger executable,
133 depending on what functions are used.
134 Do NOT set this if compiling your application
135 in plain C."
136 doc ref/ecos-ref/micro-itron-api.html
137 }
138 }}CFG_DATA */
139 #undef CYGIMP_UITRON_INLINE_FUNCS
140
141 // If not using inline functions, then uITRON functions are out-of-line; by
142 // default they have plain 'C' linkage ie. their names are extern 'C' in
143 // the C++ world and unadorned in the C world. To give them C++ names (NOT
144 // useable by plain 'C' programs), define this:
145
146 /* {{CFG_DATA
147 cdl_option CYGIMP_UITRON_CPP_OUTLINE_FUNCS {
148 display "C++ Function Names"
149 parent CYGPKG_UITRON
150 type boolean
151 description "If compiling your application with a C++ compiler,
152 uITRON functions can be given C++ style mangled names:
153 set this to make it so.
154 This option may make debugging your program easier,
155 depending on your development environment.
156 Do NOT set this if compiling your application
157 in plain C."
158 doc ref/ecos-ref/micro-itron-api.html
159 }
160 }}CFG_DATA */
161 #undef CYGIMP_UITRON_CPP_OUTLINE_FUNCS
162
163 // When an application is fully debugged it might be useful to remove the
164 // code which checks parameters in the uITRON function calls. To use
165 // asserts [CYG_ASSERT()] instead - which are compiled to nothing in
166 // release flavored builds - define this:
167
168 /* {{CFG_DATA
169 cdl_option CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS {
170 display "Return Error Codes for Bad Params"
171 parent CYGPKG_UITRON
172 type boolean
173 description "When an application is fully debugged there is no need
174 to check for bad parameters on every system call, for those
175 parameters which are typically pointers or constants.
176 Removing the checking code saves space
177 and improves performance: set this to make it so.
178 When this option is set, the correctness of parameters
179 is asserted using CYG_ASSERT() which compiles to
180 nothing in a non-debug configuration."
181 doc ref/ecos-ref/micro-itron-api.html
182 }
183 }}CFG_DATA */
184 #define CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS
185
186 // By default both C's NULL and uITRON's NADR are treated as bad addresses;
187 // but some controllers might have memory at address zero, and want to use
188 // it. In that case, prevent NULL being bounced by enabling this:
189
190 /* {{CFG_DATA
191 cdl_option CYGSEM_UITRON_PARAMS_NULL_IS_GOOD_PTR {
192 display "NULL is a good pointer"
193 parent CYGPKG_UITRON
194 type boolean
195 description "uITRON deliberately defines the constant NADR (-1) for
196 use as an invalid memory address.
197 The value -1 is chosen to allow working in microcontrollers
198 which have real memory at address zero, the traditional 'C'
199 NULL pointer.
200 By default, uITRON functions check for both NULL and NADR as
201 bad addresses: set this option to prevent checking for
202 NULL and allow pointers to address zero to be used."
203 doc ref/ecos-ref/micro-itron-api.html
204 }
205 }}CFG_DATA */
206 #undef CYGSEM_UITRON_PARAMS_NULL_IS_GOOD_PTR
207
208
209 // ------------------------------------------------------------------------
210 // uITRON KERNEL OBJECTS
211 // ------------------------------------------------------------------------
212 // First, simple synchronisation objects without complex initialization:
213 // semaphores, message or mail boxes and flags. Declare how many of each
214 // will exist in the system. They will be statically created with default
215 // initialization, ready for use. Their IDs in the uITRON sense are from 1
216 // to the value of the appropriate symbol below:
217
218 /* {{CFG_DATA
219 cdl_component CYGPKG_UITRON_SEMAS {
220 display "Semaphores"
221 type boolean
222 parent CYGPKG_UITRON
223 description "uITRON Semaphore objects are used with functions
224 named xxx_sem(); they support traditional semaphore
225 semantics."
226 }
227 cdl_option CYGNUM_UITRON_SEMAS {
228 display "Number of semaphores"
229 parent CYGPKG_UITRON_SEMAS
230 type count
231 legal_values 1 to 65535
232 description "The number of uITRON semaphores
233 present in the system.
234 Valid semaphore object IDs will range
235 from 1 to this value."
236 }
237 cdl_component CYGPKG_UITRON_SEMAS_CREATE_DELETE {
238 display "Support create and delete"
239 parent CYGPKG_UITRON_SEMAS
240 type boolean
241 description "Support
242 semaphore
243 create and delete operations
244 (cre_sem, del_sem).
245 Otherwise all semaphores are created,
246 up to the number specified above."
247 }
248 cdl_option CYGNUM_UITRON_SEMAS_INITIALLY {
249 display "Number of semaphores created initially"
250 parent CYGPKG_UITRON_SEMAS_CREATE_DELETE
251 type count
252 legal_values 0 to 65535
253 description "The number of uITRON semaphores initially created.
254 This number should not be more than the number
255 of semaphores in the system, though setting it to a large
256 value to mean 'all' is acceptable.
257 Initially, only semaphores numbered 1 to this number exist;
258 higher numbered ones must be created before use.
259 It is only useful to initialize semaphores up to this number;
260 higher numbered ones must be created in order to use them,
261 and so they will be re-initialized."
262
263 }
264 cdl_component CYGPKG_UITRON_SEMAS_ARE_INITIALIZED {
265 display "Initialize semaphore counts"
266 parent CYGPKG_UITRON_SEMAS
267 type boolean
268 description "Initialize semaphores to specific count values.
269 Otherwise semaphores are initialized with the count
270 set to zero."
271 }
272 cdl_option CYGDAT_UITRON_SEMA_INITIALIZERS {
273 display "Static initializers"
274 parent CYGPKG_UITRON_SEMAS_ARE_INITIALIZED
275 type multiline
276 description "A list of initializers separated by commas,
277 one per line.
278 An initializer is 'CYG_UIT_SEMA(INITIAL-COUNT)'
279 or 'CYG_UIT_SEMA_NOEXS' for slots above the number
280 initially to be created, when create and delete
281 operations are supported.
282 Note: this option is invoked in the context of a
283 C++ array initializer, between curly brackets.
284 Ensure that the number of initializers here exactly
285 matches the total number of semaphores specified."
286 }
287 }}CFG_DATA */
288
289 // Counting Semaphores: xxx_sem() ops in uITRON.
290 #define CYGPKG_UITRON_SEMAS
291 #define CYGNUM_UITRON_SEMAS 3
292 #undef CYGPKG_UITRON_SEMAS_ARE_INITIALIZED
293
294 // Optionally initialize in terms of CYG_UIT_SEMA( initial_count ):
295 #ifdef CYGPKG_UITRON_SEMAS
296 #ifdef CYGPKG_UITRON_SEMAS_ARE_INITIALIZED
297 #if 0 < CYGNUM_UITRON_SEMAS
298 #define CYGDAT_UITRON_SEMA_INITIALIZERS \
299 CYG_UIT_SEMA( 1 ), \
300 CYG_UIT_SEMA( 0 ), \
301 CYG_UIT_SEMA( 99 )
302 #endif
303 #endif // CYGPKG_UITRON_SEMAS_ARE_INITIALIZED
304
305 #define CYGPKG_UITRON_SEMAS_CREATE_DELETE
306
307 #ifdef CYGPKG_UITRON_SEMAS_CREATE_DELETE
308 #define CYGNUM_UITRON_SEMAS_INITIALLY 3
309 #endif // CYGPKG_UITRON_SEMAS_CREATE_DELETE
310
311 #endif // CYGPKG_UITRON_SEMAS
312
313 /* {{CFG_DATA
314 cdl_component CYGPKG_UITRON_MBOXES {
315 display "Mailboxes"
316 type boolean
317 parent CYGPKG_UITRON
318 description "uITRON Mailbox objects are used with functions
319 named xxx_msg() and xxx_mbx(); they support
320 passing addresses (of 'messages') between tasks
321 in a safe manner."
322 }
323 cdl_option CYGNUM_UITRON_MBOXES {
324 display "Number of mailboxes"
325 parent CYGPKG_UITRON_MBOXES
326 type count
327 legal_values 1 to 65535
328 description "The number of uITRON mailboxes
329 present in the system.
330 Valid mailbox object IDs will range
331 from 1 to this value."
332 }
333 cdl_component CYGPKG_UITRON_MBOXES_CREATE_DELETE {
334 display "Support create and delete"
335 parent CYGPKG_UITRON_MBOXES
336 type boolean
337 description "Support
338 mailbox
339 create and delete operations
340 (cre_mbx, del_mbx).
341 Otherwise all mailboxes are created,
342 up to the number specified above."
343 }
344 cdl_option CYGNUM_UITRON_MBOXES_INITIALLY {
345 display "Number of mailboxes created initially"
346 parent CYGPKG_UITRON_MBOXES_CREATE_DELETE
347 type count
348 legal_values 0 to 65535
349 description "The number of uITRON mailboxes initially created.
350 This number should not be more than the number
351 of mailboxes in the system, though setting it to a large
352 value to mean 'all' is acceptable.
353 Initially, only mailboxes numbered 1 to this number exist;
354 higher numbered ones must be created before use."
355 }
356 }}CFG_DATA */
357
358 // Message Boxes: xxx_msg() ops in uITRON.
359 #define CYGPKG_UITRON_MBOXES
360 #define CYGNUM_UITRON_MBOXES 4
361
362 #ifdef CYGPKG_UITRON_MBOXES
363
364 #define CYGPKG_UITRON_MBOXES_CREATE_DELETE
365
366 #ifdef CYGPKG_UITRON_MBOXES_CREATE_DELETE
367 #define CYGNUM_UITRON_MBOXES_INITIALLY 4
368 #endif // CYGPKG_UITRON_MBOXES_CREATE_DELETE
369 #endif // CYGPKG_UITRON_MBOXES
370
371 /* {{CFG_DATA
372 cdl_component CYGPKG_UITRON_FLAGS {
373 display "Eventflags"
374 type boolean
375 parent CYGPKG_UITRON
376 description "uITRON Eventflag objects are used with functions
377 named xxx_flg(); they support communication between
378 tasks by means of setting and clearing bits in a word
379 or flag value.
380 Waiting for all or any of a set of bits is supported."
381 }
382 cdl_option CYGNUM_UITRON_FLAGS {
383 display "Number of event flags"
384 parent CYGPKG_UITRON_FLAGS
385 type count
386 legal_values 1 to 65535
387 description "The number of uITRON eventflag
388 objects present in the system.
389 Valid eventflag object IDs will range
390 from 1 to this value."
391 }
392 cdl_component CYGPKG_UITRON_FLAGS_CREATE_DELETE {
393 display "Support create and delete"
394 parent CYGPKG_UITRON_FLAGS
395 type boolean
396 description "Support
397 eventflag
398 create and delete operations
399 (cre_flg, del_flg).
400 Otherwise all eventflags are created,
401 up to the number specified above."
402 }
403 cdl_option CYGNUM_UITRON_FLAGS_INITIALLY {
404 display "Number of eventflags created initially"
405 parent CYGPKG_UITRON_FLAGS_CREATE_DELETE
406 type count
407 legal_values 0 to 65535
408 description "The number of uITRON eventflags initially created.
409 This number should not be more than the number
410 of eventflags in the system, though setting it to a large
411 value to mean 'all' is acceptable.
412 Initially, only eventflags numbered 1 to this number exist;
413 higher numbered ones must be created before use."
414 }
415 }}CFG_DATA */
416
417 // Flags: xxx_flg ops in uITRON.
418 #define CYGPKG_UITRON_FLAGS
419 #define CYGNUM_UITRON_FLAGS 5
420
421 #ifdef CYGPKG_UITRON_FLAGS
422
423 #define CYGPKG_UITRON_FLAGS_CREATE_DELETE
424
425 #ifdef CYGPKG_UITRON_FLAGS_CREATE_DELETE
426 #define CYGNUM_UITRON_FLAGS_INITIALLY 5
427 #endif // CYGPKG_UITRON_FLAGS_CREATE_DELETE
428 #endif // CYGPKG_UITRON_FLAGS
429
430 // ------------------------------------------------------------------------
431 // Next, uITRON tasks. These must be initialized, and the number of them
432 // must match the number of entries in the initializer definition.
433 //
434 // CYGNUM_UITRON_TASKS defines the number of tasks; they are numbered 1
435 // through CYGNUM_UITRON_TASKS.
436 //
437 // CYGDAT_UITRON_TASK_EXTERNS is used to declare external symbols which are
438 // used in the initializations, typically the addresses of the functions who
439 // implement each of the tasks. Other objects might also be declared, for
440 // example stack data or scratch data which is used by the tasks.
441 //
442 // CYGDAT_UITRON_TASK_INITIALIZERS defines a list of CYG_UIT_TASK()
443 // initializers, separated by commas. The number of these defines how many
444 // uITRON tasks exist in the system.
445 //
446 // Both of these symbols must be defined.
447 //
448 // Task IDs in the uITRON sense are from 1 to the number of uITRON tasks
449 // which exist in the system, defined by CYGDAT_UITRON_TASK_INITIALIZERS.
450 //
451 // Tasks are dormant by default from the start; they must be resumed in
452 // order to run when the scheduler starts. Code to do this is provided in
453 // the uITRON package; it is present if this symbol is defined, and can be
454 // called from plain C code:
455 // CYGNUM_UITRON_START_TASKS > 0: start tasks 1..<value>
456 // CYGNUM_UITRON_START_TASKS = 0: start all uITRON tasks
457 // ie. 1..CYGNUM_UITRON_TASKS
458 //
459 // Alternatively, an expert programmer could start the uITRON tasks
460 // individually using the C++ system calls on the static array of tasks
461 // declared in uit_objs.hxx
462
463 /* {{CFG_DATA
464 cdl_component CYGPKG_UITRON_TASKS {
465 display "Tasks"
466 type dummy
467 parent CYGPKG_UITRON
468 description "uITRON Tasks are the basic blocks of multi-tasking
469 in the uITRON world; they are threads or lightweight
470 processes, sharing the address space and the CPU.
471 They communicate using the primitives outlined above.
472 Each has a stack, an entry point (a C or C++ function),
473 and (where appropriate) a scheduling priority."
474 }
475 cdl_option CYGNUM_UITRON_TASKS {
476 display "Number of tasks"
477 parent CYGPKG_UITRON_TASKS
478 type count
479 legal_values 1 to 65535
480 description "The number of uITRON tasks
481 present in the system.
482 Valid task object IDs will range
483 from 1 to this value."
484 }
485 cdl_option CYGNUM_UITRON_START_TASKS {
486 display "Start tasks"
487 parent CYGPKG_UITRON_TASKS
488 type count
489 legal_values 0 to 65535
490 description "The number of uITRON tasks
491 to start automatically.
492 Tasks from 1 to this value will be started
493 at the beginning of application execution.
494 A value of zero here means to start them all.
495 Tasks started in this way have a start code of
496 zero, as if they were started by sta_tsk(i,0).
497 If create and delete operations are supported,
498 this number should be no greater than the number
499 of tasks created initially."
500 }
501 cdl_component CYGPKG_UITRON_TASKS_CREATE_DELETE {
502 display "Support create and delete"
503 parent CYGPKG_UITRON_TASKS
504 type boolean
505 description "Support
506 task
507 create and delete operations
508 (cre_tsk, del_tsk).
509 Otherwise all tasks are created,
510 up to the number specified above."
511 }
512 cdl_option CYGNUM_UITRON_TASKS_INITIALLY {
513 display "Number of tasks created initially"
514 parent CYGPKG_UITRON_TASKS_CREATE_DELETE
515 type count
516 legal_values 1 to 65535
517 description "The number of uITRON tasks initially created.
518 This number should not be more than the number
519 of tasks in the system, though setting it to a large
520 value to mean 'all' is acceptable.
521 Initially, only tasks numbered 1 to this number exist;
522 higher numbered ones must be created before use."
523 }
524 cdl_option CYGNUM_UITRON_STACK_SIZE {
525 display "Default stack size"
526 parent CYGPKG_UITRON_TASKS
527 type count
528 legal_values 128 to 0x7FFFFFFF
529 description "Define a default stack size for uITRON tasks,
530 for use in the initialization options below."
531 }
532 cdl_option CYGDAT_UITRON_TASK_EXTERNS {
533 display "Externs for initialization"
534 parent CYGPKG_UITRON_TASKS
535 type multiline
536 description "Task initializers may refer to external objects
537 such as memory for stack or functions to call.
538 Use this option to define or declare any external
539 objects needed by the task static initializer below.
540 Example: create some memory for a stack using
541 'static char stack1[CYGNUM_UITRON_STACK_SIZE];'
542 to set up a chunk of memory of the default stack size.
543 Note: this option is invoked in the 'outermost' context
544 of C++ source, where global/static objects are created;
545 it should contain valid, self-contained, C++ source."
546 }
547 cdl_option CYGDAT_UITRON_TASK_INITIALIZERS {
548 display "Static initializers"
549 parent CYGPKG_UITRON_TASKS
550 type multiline
551 description "Tasks must be statically
552 initialized: enter a list of initializers
553 separated by commas, one per line.
554 An initializer is
555 'CYG_UIT_TASK(NAME,PRIO,FUNC,STACK,SIZE)'
556 where name is a quoted string to name the task,
557 prio is the initial priority of the task,
558 func is the name of the entry point,
559 stack is the address of the task's stack,
560 and size is the size of the task's stack.
561 When create and delete operations are supported,
562 'CYG_UIT_TASK_NOEXS(NAME,STACK,SIZE)' should be
563 used for tasks which are not initially created,
564 in order to tell the system what memory to use
565 for stacks when these tasks are created later on.
566 Using 'CYGNUM_UITRON_STACK_SIZE' for size
567 is recommended, to use the option defined above,
568 so long as that truly is the size of your stack(s).
569 Note: this option is invoked in the context of a
570 C++ array initializer, between curly brackets.
571 Ensure that the number of initializers here exactly
572 matches the number of tasks specified."
573 }
574 }}CFG_DATA */
575
576
577 // This default configuration has 4 tasks called task1, task2, task3 and
578 // task4, and only task1 is started up by cyg_uitron_start().
579
580 // first specify how many tasks we have
581 // no PKG define, tasks are not optional
582 #define CYGNUM_UITRON_TASKS 4
583
584 #define CYGNUM_UITRON_START_TASKS 1 // start task1 only
585
586 #define CYGNUM_UITRON_STACK_SIZE 2048
587
588 #define CYGDAT_UITRON_TASK_EXTERNS \
589 extern "C" void task1( unsigned int ); \
590 extern "C" void task2( unsigned int ); \
591 extern "C" void task3( unsigned int ); \
592 extern "C" void task4( unsigned int ); \
593 static char stack1[ CYGNUM_UITRON_STACK_SIZE ], \
594 stack2[ CYGNUM_UITRON_STACK_SIZE ], \
595 stack3[ CYGNUM_UITRON_STACK_SIZE ], \
596 stack4[ CYGNUM_UITRON_STACK_SIZE ];
597
598 // then initialize in terms of
599 // CYG_UIT_TASK( "name", prio, func, stackaddress, stacksize )
600 // [or CYG_UIT_TASK_NOEXS( "name", stackaddress, stacksize ) ]
601 // [for create/delete enabled, tasks which are not initially created. ]
602 #define CYGDAT_UITRON_TASK_INITIALIZERS \
603 CYG_UIT_TASK( "t1", 1, task1, &stack1, CYGNUM_UITRON_STACK_SIZE ), \
604 CYG_UIT_TASK( "t2", 2, task2, &stack2, CYGNUM_UITRON_STACK_SIZE ), \
605 CYG_UIT_TASK( "t3", 3, task3, &stack3, CYGNUM_UITRON_STACK_SIZE ), \
606 CYG_UIT_TASK( "t4", 4, task4, &stack4, CYGNUM_UITRON_STACK_SIZE ), \
607
608 // Do we support create and delete?
609 #define CYGPKG_UITRON_TASKS_CREATE_DELETE
610
611 #ifdef CYGPKG_UITRON_TASKS_CREATE_DELETE
612 #define CYGNUM_UITRON_TASKS_INITIALLY 4
613 #endif // CYGPKG_UITRON_TASKS_CREATE_DELETE
614
615 // ------------------------------------------------------------------------
616 // Memory Pools, both fixed and variable block:
617 //
618 // Any such object must be initialized, so the number of them defined must
619 // match the number of entries in the initializer much as for tasks.
620
621 // Fixed block allocation memory pools:
622
623 /* {{CFG_DATA
624 cdl_component CYGPKG_UITRON_MEMPOOLFIXED {
625 display "Fixed-Size Memorypools "
626 type boolean
627 parent CYGPKG_UITRON
628 description "uITRON supports memory pools for dynamic, task-safe
629 memory allocation.
630 Two kinds are supported, fixed-size and variable-size.
631 There may be multiple of each
632 type of pool, each with differing characteristics.
633 This option controls whether there are any fixed-size
634 memorypools in the system.
635 A fixed-size memorypool allocates blocks of memory of
636 its preset fixed size and none other."
637 }
638 cdl_option CYGNUM_UITRON_MEMPOOLFIXED {
639 display "Number of fixed-size memory pools"
640 parent CYGPKG_UITRON_MEMPOOLFIXED
641 type count
642 legal_values 1 to 65535
643 description "The number of uITRON Fixed-Size
644 Memorypools present in the system.
645 Valid Fixed-Size Memorypool IDs will range
646 from 1 to this value."
647 }
648 cdl_component CYGPKG_UITRON_MEMPOOLFIXED_CREATE_DELETE {
649 display "Support create and delete"
650 parent CYGPKG_UITRON_MEMPOOLFIXED
651 type boolean
652 description "Support
653 fixed-size memory pool
654 create and delete operations
655 (cre_mpf, del_mpf).
656 Otherwise all fixed mempools are created,
657 up to the number specified above."
658 }
659 cdl_option CYGNUM_UITRON_MEMPOOLFIXED_INITIALLY {
660 display "Number of fixed mempools created initially"
661 parent CYGPKG_UITRON_MEMPOOLFIXED_CREATE_DELETE
662 type count
663 legal_values 0 to 65535
664 description "The number of fixed mempools initially created.
665 This number should not be more than the number
666 of fixed mempools in the system, though setting
667 it to a large value to mean 'all' is acceptable.
668 Initially, only fixed mempools numbered from
669 1 to this number exist;
670 higher numbered ones must be created before use.
671 Whilst all mempools must be initialized to tell
672 the system what memory to use for each pool,
673 it is only useful to initialize the blocksize of
674 fixed mempools up to this number;
675 the blocksize for higher numbered ones
676 will be defined when they are created."
677 }
678 cdl_option CYGDAT_UITRON_MEMPOOLFIXED_EXTERNS {
679 display "Externs for initialization"
680 parent CYGPKG_UITRON_MEMPOOLFIXED
681 type multiline
682 description "Fixed mempool initializers may refer to external
683 objects such as memory for the pool to manage.
684 Use this option to define or declare any external
685 objects needed by the pool's static initializer below.
686 Example: create some memory for a mempool using
687 'static char fpool1[2000];'
688 to set up a chunk of memory of 2000 bytes.
689 Note: this option is invoked in the 'outermost' context
690 of C++ source, where global/static objects are created;
691 it should contain valid, self-contained, C++ source."
692 }
693 cdl_option CYGDAT_UITRON_MEMPOOLFIXED_INITIALIZERS {
694 display "Static initializers"
695 parent CYGPKG_UITRON_MEMPOOLFIXED
696 type multiline
697 description "Fixed block memory pools should be statically
698 initialized: enter a list of initializers
699 separated by commas, one per line.
700 An initializer is
701 'CYG_UIT_MEMPOOLFIXED(ADDR,SIZE,BLOCK)'
702 where addr is the address of memory to manage,
703 size is the total size of that memory, and
704 block is the block size for allocation by the pool.
705 If create and delete operations are supported,
706 initializers of the form
707 'CYG_UIT_MEMPOOLFIXED_NOEXS(ADDR,SIZE)' should be
708 used for pools which are not initially created, to tell
709 the system what memory to use for each pool.
710 Note: this option is invoked in the context of a
711 C++ array initializer, between curly brackets.
712 Ensure that the number of initializers here exactly
713 matches the total number of fixed pools specified."
714 }
715 }}CFG_DATA */
716
717 #define CYGPKG_UITRON_MEMPOOLFIXED
718 #define CYGNUM_UITRON_MEMPOOLFIXED 3
719
720 #ifdef CYGPKG_UITRON_MEMPOOLFIXED
721 #if 0 < CYGNUM_UITRON_MEMPOOLFIXED
722
723 #define CYGPKG_UITRON_MEMPOOLFIXED_CREATE_DELETE
724
725 #ifdef CYGPKG_UITRON_MEMPOOLFIXED_CREATE_DELETE
726 #define CYGNUM_UITRON_MEMPOOLFIXED_INITIALLY 3
727 #endif // CYGPKG_UITRON_MEMPOOLFIXED_CREATE_DELETE
728
729 #define CYGDAT_UITRON_MEMPOOLFIXED_EXTERNS \
730 static char fpool1[ 2000 ], \
731 fpool2[ 2000 ], \
732 fpool3[ 2000 ];
733
734 // in terms of CYG_UIT_MEMPOOLFIXED( addr, size, blocksize );
735 // [or CYG_UIT_MEMPOOLFIXED_NOEXS( addr, size ) if cre/del supported]
736 #define CYGDAT_UITRON_MEMPOOLFIXED_INITIALIZERS \
737 CYG_UIT_MEMPOOLFIXED( fpool1, 2000, 20 ), \
738 CYG_UIT_MEMPOOLFIXED( fpool2, 2000, 100 ), \
739 CYG_UIT_MEMPOOLFIXED( fpool3, 2000, 500 ), \
740
741 #endif
742 #endif // do we have fixed memory pools?
743
744 // Variable block memory pools:
745
746 /* {{CFG_DATA
747 cdl_component CYGPKG_UITRON_MEMPOOLVAR {
748 display "Variable-Size Memorypools "
749 type boolean
750 parent CYGPKG_UITRON
751 description "uITRON supports memory pools for dynamic, task-safe
752 memory allocation.
753 Two kinds are supported, fixed-size and variable-size.
754 There may be multiple of each
755 type of pool, each with differing characteristics.
756 This option controls whether there are any variable-size
757 memorypools in the system.
758 A variable-size memorypool allocates blocks of memory of
759 any size requested, resources permitting."
760 }
761 cdl_option CYGNUM_UITRON_MEMPOOLVAR {
762 display "Number of variable-size memory pools"
763 parent CYGPKG_UITRON_MEMPOOLVAR
764 type count
765 legal_values 1 to 65535
766 description "The number of uITRON Variable-Size
767 Memorypools present in the system.
768 Valid Variable-Size Memorypool IDs will range
769 from 1 to this value."
770 }
771 cdl_component CYGPKG_UITRON_MEMPOOLVAR_CREATE_DELETE {
772 display "Support create and delete"
773 parent CYGPKG_UITRON_MEMPOOLVAR
774 type boolean
775 description "Support
776 variable-size memory pool
777 create and delete operations
778 (cre_mpl, del_mpl).
779 Otherwise all variable-size mempools are created,
780 up to the number specified above."
781 }
782 cdl_option CYGNUM_UITRON_MEMPOOLVAR_INITIALLY {
783 display "Number of variable-size mempools created initially"
784 parent CYGPKG_UITRON_MEMPOOLVAR_CREATE_DELETE
785 type count
786 legal_values 0 to 65535
787 description "The number of variable-size mempools initially created.
788 This number should not be more than the number
789 of variable mempools in the system, though setting
790 it to a large value to mean 'all' is acceptable.
791 Initially, only variable mempools numbered from
792 1 to this number exist;
793 higher numbered ones must be created before use.
794 All mempools must be initialized to tell
795 the system what memory to use for each pool."
796 }
797 cdl_option CYGDAT_UITRON_MEMPOOLVAR_EXTERNS {
798 display "Externs for initialization"
799 parent CYGPKG_UITRON_MEMPOOLVAR
800 type multiline
801 description "Variable mempool initializers may refer to external
802 objects such as memory for the pool to manage.
803 Use this option to define or declare any external
804 objects needed by the pool's static initializer below.
805 Example: create some memory for a mempool using
806 'static char vpool1[2000];'
807 to set up a chunk of memory of 2000 bytes.
808 Note: this option is invoked in the 'outermost' context
809 of C++ source, where global/static objects are created;
810 it should contain valid, self-contained, C++ source."
811 }
812 cdl_option CYGDAT_UITRON_MEMPOOLVAR_INITIALIZERS {
813 display "Static initializers"
814 parent CYGPKG_UITRON_MEMPOOLVAR
815 type multiline
816 description "Variable block memory pools should be statically
817 initialized: enter a list of initializers
818 separated by commas, one per line.
819 An initializer is
820 'CYG_UIT_MEMPOOLVAR(ADDR,SIZE)'
821 where addr is the address of memory to manage, and
822 size is the total size of that memory.
823 If create and delete operations are supported,
824 initializers of the form
825 'CYG_UIT_MEMPOOLVAR_NOEXS(ADDR,SIZE)' should be
826 used for pools which are not initially created, to tell
827 the system what memory to use for each pool.
828 Note: this option is invoked in the context of a
829 C++ array initializer, between curly brackets.
830 Ensure that the number of initializers here exactly
831 matches the total number of variable pools specified."
832 }
833 }}CFG_DATA */
834
835 #define CYGPKG_UITRON_MEMPOOLVAR
836 #define CYGNUM_UITRON_MEMPOOLVAR 3
837
838 #ifdef CYGPKG_UITRON_MEMPOOLVAR
839 #if 0 < CYGNUM_UITRON_MEMPOOLVAR
840
841 #define CYGPKG_UITRON_MEMPOOLVAR_CREATE_DELETE
842
843 #ifdef CYGPKG_UITRON_MEMPOOLVAR_CREATE_DELETE
844 #define CYGNUM_UITRON_MEMPOOLVAR_INITIALLY 3
845 #endif // CYGPKG_UITRON_MEMPOOLVAR_CREATE_DELETE
846
847 #define CYGDAT_UITRON_MEMPOOLVAR_EXTERNS \
848 static char vpool1[ 2000 ], \
849 vpool2[ 2000 ], \
850 vpool3[ 2000 ];
851
852 // in terms of CYG_UIT_MEMPOOLVAR( addr, size );
853 // [or CYG_UIT_MEMPOOLVAR_NOEXS( addr, size ) if cre/del supported]
854 #define CYGDAT_UITRON_MEMPOOLVAR_INITIALIZERS \
855 CYG_UIT_MEMPOOLVAR( vpool1, 2000 ), \
856 CYG_UIT_MEMPOOLVAR( vpool2, 2000 ), \
857 CYG_UIT_MEMPOOLVAR( vpool3, 2000 ), \
858
859 #endif
860 #endif // do we have variable memory pools?
861
862 // ------------------------------------------------------------------------
863 // One-shot Alarm and Cyclic Alarm handlers:
864 //
865 // These are declared without uninitialization; they must be defined in
866 // order to use them.
867
868
869 /* {{CFG_DATA
870 cdl_component CYGPKG_UITRON_ALARMS {
871 display "Alarm Handlers"
872 type boolean
873 parent CYGPKG_UITRON
874 requires CYGVAR_KERNEL_COUNTERS_CLOCK
875 description "uITRON Alarm Handlers are used with functions
876 named def_alm() and ref_alm(); they support
877 simple timing, with a function callback
878 at the end of the timed period."
879 }
880 cdl_option CYGNUM_UITRON_ALARMS {
881 display "Number of alarm handlers"
882 parent CYGPKG_UITRON_ALARMS
883 type count
884 legal_values 1 to 65535
885 description "The number of uITRON alarm
886 handlers present in the system.
887 Valid alarm handler numbers will range
888 from 1 to this value."
889 }
890 }}CFG_DATA */
891 #define CYGPKG_UITRON_ALARMS
892 #define CYGNUM_UITRON_ALARMS 3
893 #if 0 // initializers not supported
894 #if 0 < CYGNUM_UITRON_ALARMS
895 //#define CYGDAT_UITRON_ALARM_EXTERNS
896 // in terms of ALARM( ... )
897 //#define CYGDAT_UITRON_ALARM_INITIALIZERS
898 #endif
899 #endif // NOT SUPPORTED
900
901
902 /* {{CFG_DATA
903 cdl_component CYGPKG_UITRON_CYCLICS {
904 display "Cyclic Handlers"
905 type boolean
906 parent CYGPKG_UITRON
907 requires CYGVAR_KERNEL_COUNTERS_CLOCK
908 description "uITRON Cyclic Handlers are used with functions
909 named xxx_cyc(); they support timing
910 with a periodic function callback that
911 can be dynamically turned on or off, and
912 resynchronized with external events."
913 }
914 cdl_option CYGNUM_UITRON_CYCLICS {
915 display "Number cyclic handlers"
916 parent CYGPKG_UITRON_CYCLICS
917 type count
918 legal_values 1 to 65535
919 description "The number of uITRON cyclics
920 handlers present in the system.
921 Valid cyclic handler numbers will range
922 from 1 to this value."
923 }
924 }}CFG_DATA */
925 #define CYGPKG_UITRON_CYCLICS
926 #define CYGNUM_UITRON_CYCLICS 3
927 #if 0 // initializers not supported
928 #if 0 < CYGNUM_UITRON_CYCLICS
929 //#define CYGDAT_UITRON_CYCLIC_EXTERNS
930 // in terms of CYCLIC( ... )
931 //#define CYGDAT_UITRON_CYCLIC_INITIALIZERS
932 #endif
933 #endif // NOT SUPPORTED
934
935 // ========================================================================
936 // ------------------------------------------------------------------------
937 // uITRON VERSION INFORMATION
938 // ------------------------------------------------------------------------
939
940 /* {{CFG_DATA
941 cdl_component CYGPKG_UITRON_VERSION {
942 display "Version information"
943 type dummy
944 parent CYGPKG_UITRON
945 description "The get_ver() uITRON system call returns
946 several version related values describing
947 the vendor, product and CPU in question
948 as well as the version of the uITRON
949 standard supported.
950 These values may be specified here."
951 }
952 cdl_option CYGNUM_UITRON_VER_MAKER {
953 display "OS Maker"
954 parent CYGPKG_UITRON_VERSION
955 type count
956 legal_values 0 to 0xFFFF
957 description "This value is returned in the 'maker'
958 field of the T_VER structure in
959 response to a get_ver() system call."
960 }
961 cdl_option CYGNUM_UITRON_VER_ID {
962 display "OS Identification"
963 parent CYGPKG_UITRON_VERSION
964 type count
965 legal_values 0 to 0xFFFF
966 description "This value is returned in the 'id'
967 field of the T_VER structure in
968 response to a get_ver() system call."
969 }
970 cdl_option CYGNUM_UITRON_VER_SPVER {
971 display "ITRON Specification"
972 parent CYGPKG_UITRON_VERSION
973 type count
974 legal_values 0 to 0xFFFF
975 description "This value is returned in the 'spver'
976 field of the T_VER structure in
977 response to a get_ver() system call.
978 Do NOT change this value."
979 }
980 cdl_option CYGNUM_UITRON_VER_PRVER {
981 display "OS Product Version"
982 parent CYGPKG_UITRON_VERSION
983 type count
984 legal_values 0 to 0xFFFF
985 description "This value is returned in the 'prver'
986 field of the T_VER structure in
987 response to a get_ver() system call."
988 }
989 # PRNO fields in own folder
990 cdl_component CYGPKG_UITRON_VERSION_PRNO {
991 display "Product Info"
992 type dummy
993 parent CYGPKG_UITRON_VERSION
994 description "The get_ver() uITRON system call returns
995 several version related values describing
996 the vendor, product and CPU in question
997 as well as the version of the uITRON
998 standard supported.
999 These values may be specified here."
1000 }
1001 cdl_option CYGNUM_UITRON_VER_PRNO_0 {
1002 display "Field 0"
1003 parent CYGPKG_UITRON_VERSION_PRNO
1004 type count
1005 legal_values 0 to 0xFFFF
1006 description "This value is returned in the 'prno[0]'
1007 field of the T_VER structure in
1008 response to a get_ver() system call."
1009 }
1010 cdl_option CYGNUM_UITRON_VER_PRNO_1 {
1011 display "Field 1"
1012 parent CYGPKG_UITRON_VERSION_PRNO
1013 type count
1014 legal_values 0 to 0xFFFF
1015 description "This value is returned in the 'prno[1]'
1016 field of the T_VER structure in
1017 response to a get_ver() system call."
1018 }
1019 cdl_option CYGNUM_UITRON_VER_PRNO_2 {
1020 display "Field 2"
1021 parent CYGPKG_UITRON_VERSION_PRNO
1022 type count
1023 legal_values 0 to 0xFFFF
1024 description "This value is returned in the 'prno[2]'
1025 field of the T_VER structure in
1026 response to a get_ver() system call."
1027 }
1028 cdl_option CYGNUM_UITRON_VER_PRNO_3 {
1029 display "Field 3"
1030 parent CYGPKG_UITRON_VERSION_PRNO
1031 type count
1032 legal_values 0 to 0xFFFF
1033 description "This value is returned in the 'prno[3]'
1034 field of the T_VER structure in
1035 response to a get_ver() system call."
1036 }
1037 # up a level
1038 cdl_option CYGNUM_UITRON_VER_CPU {
1039 display "CPU Information"
1040 parent CYGPKG_UITRON_VERSION
1041 type count
1042 legal_values 0 to 0xFFFF
1043 description "This value is returned in the 'cpu'
1044 field of the T_VER structure in
1045 response to a get_ver() system call."
1046 }
1047 cdl_option CYGNUM_UITRON_VER_VAR {
1048 display "System Variant"
1049 parent CYGPKG_UITRON_VERSION
1050 type count
1051 legal_values 0 to 0xFFFF
1052 description "This value is returned in the 'var'
1053 field of the T_VER structure in
1054 response to a get_ver() system call.
1055 Do NOT change this value."
1056 }
1057 }}CFG_DATA
1058 */
1059
1060 // these constants are returned by the get_ver API call.
1061
1062 #define CYGNUM_UITRON_VER_MAKER 0 /* vendor */
1063 #define CYGNUM_UITRON_VER_ID 0 /* format number */
1064 #define CYGNUM_UITRON_VER_SPVER 0x5302 /* specification version */
1065 #define CYGNUM_UITRON_VER_PRVER 0x0100 /* product version */
1066 #define CYGNUM_UITRON_VER_PRNO_0 0 /* product control information */
1067 #define CYGNUM_UITRON_VER_PRNO_1 0
1068 #define CYGNUM_UITRON_VER_PRNO_2 0
1069 #define CYGNUM_UITRON_VER_PRNO_3 0
1070 #define CYGNUM_UITRON_VER_CPU 0 /* CPU information */
1071 #define CYGNUM_UITRON_VER_VAR 0x8000 /* variation descriptor */
1072
1073
1074 #endif // CYGPKG_UITRON
1075
1076 #endif // CYGONCE_PKGCONF_UITRON_H
1077 // EOF pgkconf/uitron.h