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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [host/] [infra/] [basetype.h] - Blame information for rev 790

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

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_HAL_BASETYPE_H
2
# define CYGONCE_HAL_BASETYPE_H
3
 
4
//======================================================================
5
//
6
//      basetype.h
7
//
8
//      HAL emulation for the host-side infrastructure.
9
//
10
//======================================================================
11
// ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
12
// -------------------------------------------                              
13
// This file is part of the eCos host tools.                                
14
// Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.            
15
//
16
// This program is free software; you can redistribute it and/or modify     
17
// it under the terms of the GNU General Public License as published by     
18
// the Free Software Foundation; either version 2 or (at your option) any   
19
// later version.                                                           
20
//
21
// This program is distributed in the hope that it will be useful, but      
22
// WITHOUT ANY WARRANTY; without even the implied warranty of               
23
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU        
24
// General Public License for more details.                                 
25
//
26
// You should have received a copy of the GNU General Public License        
27
// along with this program; if not, write to the                            
28
// Free Software Foundation, Inc., 51 Franklin Street,                      
29
// Fifth Floor, Boston, MA  02110-1301, USA.                                
30
// -------------------------------------------                              
31
// ####ECOSHOSTGPLCOPYRIGHTEND####                                          
32
//======================================================================
33
//#####DESCRIPTIONBEGIN####
34
//
35
// Author(s):   bartv
36
// Contact(s):  bartv   
37
// Date:        1998/07/13
38
// Version:     0.01
39
//
40
//####DESCRIPTIONEND####
41
//======================================================================
42
 
43
// The purpose of this header file is to replicate the functionality
44
// provided by <cyg/hal/basetype.h> on the target side. Essentially
45
// this file has to define endianness. Optionally it can also define
46
// the correct data types for e.g. cyg_count32 etc.
47
//
48
// On the host side portability is achieved by means of autoconf and
49
// feature tests, as opposed to re-implementing the HAL for each
50
// platform. In particular there will be a generated header file
51
// <pkgconf/hostinfra.h> which gets filled in during the configure
52
// process.
53
//
54
// It has been decided that the host side should use exactly the same
55
// infrastructure header files as the target side (although extra
56
// functionality may be defined in these header files where
57
// appropriate). This means that the host side needs to provide
58
// <cyg/hal/basetype.h>, even though it does not contain a HAL.
59
//
60
// This implementation of <cyg/hal/basetype.h> reads in the
61
// configuration header generated by the configure script and adapts
62
// this information into whatever is required by
63
// <cyg/infra/cyg_type.h>.
64
 
65
#ifndef CYGONCE_PKGCONF_INFRA_H
66
# include <pkgconf/infra.h>
67
#endif
68
 
69
// The autoconf test for endianness will result in a #define for
70
// LITTLE_ENDIAN_HOST on appropriate platforms. This needs to be
71
// converted into a definition of CYG_BYTEORDER as per the target-side
72
// HAL headers.
73
 
74
#ifdef WORDS_BIGENDIAN
75
# define CYG_BYTEORDER CYG_MSBFIRST
76
#else
77
# define CYG_BYTEORDER CYG_LSBFIRST
78
#endif
79
 
80
// The default definitions for cyg_halint8/16/32 and cyg_halcount8/16/32
81
// should be fine (although eventually we may come across a platform
82
// where int's are 64 bit). 64 bit arithmetic is a bit more of a problem.
83
// on the majority of systems so there is an autoconf test which will
84
// generate appropriate #define's for cyg_halint64 and cyg_halcount64,
85
// which means this header file does not to do anything more.
86
// cyg_halbool and cyg_halatomic should both be ok.
87
 
88
 
89
// Any symbols defined in <cyg/infra/config.h> which have been processed
90
// here should no longer be of any interest, and in the interests of
91
// reducing name space pollution they get undef'ed here.
92
#undef WORDS_BIGENDIAN
93
 
94
#endif  // CYGONCE_HAL_BASETYPE_H
95
// End of basetype.h

powered by: WebSVN 2.1.0

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