X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fdetect.h;h=a5420615e91db8011c9bae39bec10e641a78ebb6;hb=574d08f7aba9cfec59053ddcb7d2af3ebd0fda64;hp=33f6178cffa4efbc1d269f175ed21bfa646daa5e;hpb=b7daab00fae8117ef4d1f63848874c1bedc68c01;p=bertos.git diff --git a/bertos/cpu/detect.h b/bertos/cpu/detect.h index 33f6178c..a5420615 100644 --- a/bertos/cpu/detect.h +++ b/bertos/cpu/detect.h @@ -339,8 +339,15 @@ #define CPU_AVR_ATMEGA1281 0 #endif + #if defined(__AVR_ATmega1280__) + #define CPU_AVR_ATMEGA1280 1 + #else + #define CPU_AVR_ATMEGA1280 0 + #endif + #if CPU_AVR_ATMEGA32 + CPU_AVR_ATMEGA64 + CPU_AVR_ATMEGA103 + CPU_AVR_ATMEGA128 \ - + CPU_AVR_ATMEGA8 + CPU_AVR_ATMEGA168 + CPU_AVR_ATMEGA328P + CPU_AVR_ATMEGA1281 != 1 + + CPU_AVR_ATMEGA8 + CPU_AVR_ATMEGA168 + CPU_AVR_ATMEGA328P + CPU_AVR_ATMEGA1281 \ + + CPU_AVR_ATMEGA1280 != 1 #error AVR CPU configuration error #endif #else @@ -353,15 +360,29 @@ #define CPU_AVR_ATMEGA103 0 #define CPU_AVR_ATMEGA128 0 #define CPU_AVR_ATMEGA1281 0 + #define CPU_AVR_ATMEGA1280 0 +#endif + +#if defined (__MSP430__) + #define CPU_MSP430 1 + #define CPU_ID msp430 + + #if defined(__MSP430_2274__) + #define CPU_MSP430_2274 1 + #else + #define CPU_MSP430_2274 0 + #endif +#else + #define CPU_MSP430 0 #endif /* Self-check for the detection: only one CPU must be detected */ -#if CPU_ARM + CPU_CM3 + CPU_I196 + CPU_X86 + CPU_PPC + CPU_DSP56K + CPU_AVR == 0 +#if CPU_ARM + CPU_CM3 + CPU_I196 + CPU_X86 + CPU_PPC + CPU_DSP56K + CPU_AVR + CPU_MSP430 == 0 #error Unknown CPU #elif !defined(CPU_ID) #error CPU_ID not defined -#elif CPU_ARM + CPU_CM3 + CPU_I196 + CPU_X86 + CPU_PPC + CPU_DSP56K + CPU_AVR != 1 +#elif CPU_ARM + CPU_CM3 + CPU_I196 + CPU_X86 + CPU_PPC + CPU_DSP56K + CPU_AVR + CPU_MSP430 != 1 #error Internal CPU configuration error #endif