source: rtems/cpukit/score/cpu/avr/rtems/score/avr.h @ 46e483b8

4.104.115
Last change on this file since 46e483b8 was 46e483b8, checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/02/09 at 10:23:33

2009-12-02 Ralf Corsépius <ralf.corsepius@…>

  • rtems/score/avr.h: Add avr6.
  • Property mode set to 100644
File size: 2.2 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#elif __AVR_ARCH__ == 6
84#define CPU_MODEL_NAME  "avr6"
85#define AVR_HAS_FPU     1
86
87#else
88#error "Unsupported __AVR_ARCH__"
89#endif
90#else
91#error "__AVR_ARCH__ undefined"
92#endif
93
94#else
95
96#error "Unsupported CPU Model"
97
98#endif
99
100/*
101 *  Define the name of the CPU family.
102 */
103
104#define CPU_NAME "avr"
105
106#ifdef __cplusplus
107}
108#endif
109
110#endif /* _RTEMS_SCORE_AVR_H */
Note: See TracBrowser for help on using the repository browser.