RTEMS CPU Kit with SuperCore  4.11.3
avr.h
Go to the documentation of this file.
1 
13 /*
14  * COPYRIGHT 2004, Ralf Corsepius, Ulm, Germany.
15  *
16  * The license and distribution terms for this file may be
17  * found in the file LICENSE in this distribution or at
18  * http://www.rtems.org/license/LICENSE.
19  *
20  */
21 
22 #ifndef _RTEMS_SCORE_AVR_H
23 #define _RTEMS_SCORE_AVR_H
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 /*
30  * This file contains the information required to build
31  * RTEMS for a particular member of the NO CPU family.
32  * It does this by setting variables to indicate which
33  * implementation dependent features are present in a particular
34  * member of the family.
35  *
36  * This is a good place to list all the known CPU models
37  * that this port supports and which RTEMS CPU model they correspond
38  * to.
39  */
40 
41 /*
42  * Figure out all CPU Model Feature Flags based upon compiler
43  * predefines.
44  */
45 #if defined(__AVR__)
46 
47 #if defined(__AVR_ARCH__)
48 #if __AVR_ARCH__ == 1
49 #define CPU_MODEL_NAME "avr1"
50 #define AVR_HAS_FPU 1
51 
52 #elif __AVR_ARCH__ == 2
53 #define CPU_MODEL_NAME "avr2"
54 #define AVR_HAS_FPU 1
55 
56 #elif __AVR_ARCH__ == 3
57 #define CPU_MODEL_NAME "avr3"
58 #define AVR_HAS_FPU 1
59 
60 #elif __AVR_ARCH__ == 4
61 #define CPU_MODEL_NAME "avr4"
62 #define AVR_HAS_FPU 1
63 
64 #elif __AVR_ARCH__ == 5
65 #define CPU_MODEL_NAME "avr5"
66 #define AVR_HAS_FPU 1
67 
68 #elif __AVR_ARCH__ == 25
69 #define CPU_MODEL_NAME "avr25"
70 #define AVR_HAS_FPU 1
71 
72 #elif __AVR_ARCH__ == 31
73 #define CPU_MODEL_NAME "avr31"
74 #define AVR_HAS_FPU 1
75 
76 #elif __AVR_ARCH__ == 35
77 #define CPU_MODEL_NAME "avr35"
78 #define AVR_HAS_FPU 1
79 
80 #elif __AVR_ARCH__ == 51
81 #define CPU_MODEL_NAME "avr51"
82 #define AVR_HAS_FPU 1
83 
84 #elif __AVR_ARCH__ == 6
85 #define CPU_MODEL_NAME "avr6"
86 #define AVR_HAS_FPU 1
87 
88 #else
89 #error "Unsupported __AVR_ARCH__"
90 #endif
91 #else
92 #error "__AVR_ARCH__ undefined"
93 #endif
94 
95 #else
96 
97 #error "Unsupported CPU Model"
98 
99 #endif
100 
101 /*
102  * Define the name of the CPU family.
103  */
104 
105 #define CPU_NAME "avr"
106 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #endif /* _RTEMS_SCORE_AVR_H */