OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [tools/] [src/] [infra/] [infra.h] - Blame information for rev 611

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 26 unneback
#ifndef CYGONCE_PKGCONF_INFRA_H
2
# define CYGONCE_PKGCONF_INFRA_H
3
 
4
//======================================================================
5
//
6
//      infra.h
7
//
8
//      Host side implementation of the infrastructure configuration
9
//      header.
10
//
11
//======================================================================
12
//####COPYRIGHTBEGIN####
13
//                                                                          
14
// ----------------------------------------------------------------------------
15
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
16
//
17
// This file is part of the eCos host tools.
18
//
19
// This program is free software; you can redistribute it and/or modify it 
20
// under the terms of the GNU General Public License as published by the Free 
21
// Software Foundation; either version 2 of the License, or (at your option) 
22
// any later version.
23
// 
24
// This program is distributed in the hope that it will be useful, but WITHOUT 
25
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
26
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
27
// more details.
28
// 
29
// You should have received a copy of the GNU General Public License along with
30
// this program; if not, write to the Free Software Foundation, Inc., 
31
// 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
32
//
33
// ----------------------------------------------------------------------------
34
//                                                                          
35
//####COPYRIGHTEND####
36
//======================================================================
37
//#####DESCRIPTIONBEGIN####
38
//
39
// Author(s):   bartv
40
// Contact(s):  bartv   
41
// Date:        1998/07/13
42
// Version:     0.01
43
//
44
//####DESCRIPTIONEND####
45
//======================================================================
46
 
47
// The purpose of this header file is to replicate appropriate
48
// functionality from the target-side header file <pkgconf/infra.h>.
49
// This header file is intended to contain configuration options
50
// related to the implementation of the infrastructure, as opposed
51
// to how that infrastructure gets used by other packages. A good
52
// example would be a configuration option to control the size
53
// of the circular trace buffer.
54
//
55
// On the host side these things are handled by autoconf, and in
56
// particular the configure.in script will offer command-line
57
// arguments allowing the relevant options to be controlled.
58
// The relevant information will end up in <cyg/pkgconf/hostinfra.h>
59
# include <pkgconf/hostinfra.h>
60
 
61
// Some options should always be enabled in this header file.
62
#define CYGDBG_INFRA_DIAG_PRINTF_USE_VARARG
63
#define CYGDBG_INFRA_DEBUG_ASSERT_MESSAGE
64
#define CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
65
 
66
// Other options should be decided on a package by package basis,
67
// e.g. whether or not assertions are used. On the host side it is
68
// not appropriate to control these globally, instead the infrastructure
69
// always provides the necessary functionality and it is up to the
70
// other parts of the system to decide whether or not the facilities
71
// get used.
72
 
73
// A third set of options deal with the environment, e.g. the sizes
74
// of various data types. autoconf macros take care of most of the
75
// work, but some translation is needed into eCos-style names to
76
// avoid namespace pollution.
77
 
78
// Process the definitions of SIZEOF_INT_P and SIZEOF_LONG to work
79
// out a sensible data type for CYG_ADDRESS and CYG_ADDRWORD.
80
 
81
#if (!defined(SIZEOF_INT_P) || !defined(SIZEOF_LONG))
82
# error "Configure problem: data type sizes not set"
83
#endif
84
 
85
#if (SIZEOF_INT_P == 4)
86
    // The default, nothing needs to be done
87
#elif (SIZEOF_INT_P == 8)
88
# define cyg_haladdress cyg_halint64
89
#else
90
# error "Only 32 and 64 bit pointers are supported"
91
#endif
92
 
93
#if ((SIZEOF_INT_P == 4) && (SIZEOF_LONG == 4))
94
    // The default, nothing needs to be done
95
#elif ((SIZEOF_INT_P <= 8) && (SIZEOF_LONG <= 8))
96
    // cyg_halint64 will have been defined appropriately.
97
# define cyg_haladdrword cyg_halint64
98
#else
99
# error "Only 32 and 64 bit machine word sizes are supported"
100
#endif
101
 
102
// Any symbols defined in <pkgconf/hostconf.h> which have been processed
103
// here should no longer be of any interest, and in the interests of
104
// reducing name space pollution they get undef'ed here.
105
 
106
// In addition there are two #define's in the config.h header file
107
// which are always present and which have names that are rather too
108
// generic. These get removed here as well. The version is worth
109
// preserving under a different name.
110
#undef SIZEOF_INT_P
111
#undef SIZEOF_LONG
112
#undef PACKAGE
113
#undef VERSION
114
 
115
#endif  // CYGONCE_PKGCONF_INFRA_H
116
// End of infra.h

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.