X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fdetect.h;h=a5420615e91db8011c9bae39bec10e641a78ebb6;hb=a3f9ca9d86b7f8da31204746cc32e13c2dbe5ed0;hp=8e1a69faf2764cec6d7aaf3dd40422939ee865d5;hpb=e2cdc8384c68cea178b0e585bb4467dae454b449;p=bertos.git diff --git a/bertos/cpu/detect.h b/bertos/cpu/detect.h index 8e1a69fa..a5420615 100644 --- a/bertos/cpu/detect.h +++ b/bertos/cpu/detect.h @@ -192,11 +192,11 @@ #define CPU_CM3_LM3S8962 0 #endif - #if defined (__ARM_STM32F103R8__) + #if defined (__ARM_STM32F103RB__) #define CPU_CM3_STM32 1 - #define CPU_CM3_STM32F103R8 1 + #define CPU_CM3_STM32F103RB 1 #else - #define CPU_CM3_STM32F103R8 0 + #define CPU_CM3_STM32F103RB 0 #endif #if defined (CPU_CM3_LM3S) @@ -205,7 +205,7 @@ #endif #define CPU_CM3_STM32 0 #elif defined (CPU_CM3_STM32) - #if CPU_CM3_STM32F103R8 + 0 != 1 + #if CPU_CM3_STM32F103RB + 0 != 1 #error STM32 Cortex-M3 CPU configuration error #endif #define CPU_CM3_LM3S 0 @@ -231,7 +231,7 @@ #define CPU_CM3_STM32 0 - #define CPU_CM3_STM32F103R8 0 + #define CPU_CM3_STM32F103RB 0 #endif #if (defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)) \ @@ -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