4 * Copyright 2004 Develer S.r.l. (http://www.develer.com/)
5 * Copyright 2004 Giovanni Bajo
6 * This file is part of DevLib - See devlib/README for information.
9 * \brief CPU detection through special preprocessor macros
15 * Revision 1.1 2004/07/30 17:14:49 rasky
16 * File sfuggito al commit precedente (nuova gestione unificata del detect della CPU
18 * Revision 1.2 2004/07/30 10:31:07 rasky
19 * Aggiunto detect per ATmega128
21 * Revision 1.1 2004/07/22 16:37:34 rasky
22 * Nuovo file cpu_detect.h per il detect della CPU
23 * Nuova macro CPU_HEADER per includere l'header cpu-specific di ogni modulo
24 * Razionalizzazione dei principali #ifdef per piattaforma con le nuove macro
25 * Nuove macro-utility PP_STRINGIZE e PP_CATn
32 #if defined(__IAR_SYSTEMS_ICC) || defined(__IAR_SYSTEMS_ICC__)
39 #if defined(__i386__) || defined(_MSC_VER)
46 #if defined(__m56800E__) || defined(__m56800__)
57 #if defined(__AVR_ATmega64__)
58 #define CPU_AVR_ATMEGA64 1
60 #define CPU_AVR_ATMEGA64 0
63 #if defined(__AVR_ATmega103__)
64 #define CPU_AVR_ATMEGA103 1
66 #define CPU_AVR_ATMEGA103 0
69 #if defined(__AVR_ATmega128__)
70 #define CPU_AVR_ATMEGA128 1
72 #define CPU_AVR_ATMEGA128 0
75 #if defined(__AVR_ATmega8__)
76 #define CPU_AVR_ATMEGA8 1
78 #define CPU_AVR_ATMEGA8 0
82 #define CPU_AVR_ATMEGA8 0
83 #define CPU_AVR_ATMEGA64 0
84 #define CPU_AVR_ATMEGA103 0
85 #define CPU_AVR_ATMEGA128 0
89 // Self-check for the detection: only one CPU must be detected
90 #if CPU_I196 + CPU_X86 + CPU_DSP56K + CPU_AVR == 0
92 #elif !defined(CPU_ID)
93 #error CPU_ID not defined
94 #elif CPU_I196 + CPU_X86 + CPU_DSP56K + CPU_AVR != 1
95 #error Internal CPU configuration error
99 #endif /* CPU_DETECT_H */