source: rtems/cpukit/score/cpu/avr/rtems/score/avr.h @ 05c1886

4.104.115
Last change on this file since 05c1886 was 05c1886, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/30/09 at 16:01:51

Whitespace removal.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/**
2 * @file rtems/score/avr.h
3 */
4
5/*
6 *  This file sets up basic CPU dependency settings based on
7 *  compiler settings.  For example, it can determine if
8 *  floating point is available.  This particular implementation
9 *  is specified to the avr port.
10 *
11 *  COPYRIGHT 2004, Ralf Corsepius, Ulm, Germany.
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.com/license/LICENSE.
16 *
17 *  $Id$
18 *
19 */
20
21#ifndef _RTEMS_SCORE_AVR_H
22#define _RTEMS_SCORE_AVR_H
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/*
29 *  This file contains the information required to build
30 *  RTEMS for a particular member of the NO CPU family.
31 *  It does this by setting variables to indicate which
32 *  implementation dependent features are present in a particular
33 *  member of the family.
34 *
35 *  This is a good place to list all the known CPU models
36 *  that this port supports and which RTEMS CPU model they correspond
37 *  to.
38 */
39
40/*
41 *  Figure out all CPU Model Feature Flags based upon compiler
42 *  predefines.
43 */
44#if defined(__AVR__)
45
46#if defined(__AVR_ARCH__)
47#if   __AVR_ARCH__ == 1
48#define CPU_MODEL_NAME  "avr1"
49#define AVR_HAS_FPU     1
50
51#elif __AVR_ARCH__ == 2
52#define CPU_MODEL_NAME  "avr2"
53#define AVR_HAS_FPU     1
54
55#elif __AVR_ARCH__ == 3
56#define CPU_MODEL_NAME  "avr3"
57#define AVR_HAS_FPU     1
58
59#elif __AVR_ARCH__ == 4
60#define CPU_MODEL_NAME  "avr4"
61#define AVR_HAS_FPU     1
62
63#elif __AVR_ARCH__ == 5
64#define CPU_MODEL_NAME  "avr5"
65#define AVR_HAS_FPU     1
66
67#elif __AVR_ARCH__ == 25
68#define CPU_MODEL_NAME  "avr25"
69#define AVR_HAS_FPU     1
70
71#elif __AVR_ARCH__ == 31
72#define CPU_MODEL_NAME  "avr31"
73#define AVR_HAS_FPU     1
74
75#elif __AVR_ARCH__ == 35
76#define CPU_MODEL_NAME  "avr35"
77#define AVR_HAS_FPU     1
78
79#elif __AVR_ARCH__ == 51
80#define CPU_MODEL_NAME  "avr51"
81#define AVR_HAS_FPU     1
82
83#else
84#error "Unsupported __AVR_ARCH__"
85#endif
86#else
87#error "__AVR_ARCH__ undefined"
88#endif
89
90#else
91
92#error "Unsupported CPU Model"
93
94#endif
95
96/*
97 *  Define the name of the CPU family.
98 */
99
100#define CPU_NAME "avr"
101
102#ifdef __cplusplus
103}
104#endif
105
106#endif /* _RTEMS_SCORE_AVR_H */
Note: See TracBrowser for help on using the repository browser.