X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fdetect.h;h=8dce9b8f3b40817efe4dfff917211e5ebe3e790b;hb=f1fab319eb3fe91c157b3a9564841aef62a03554;hp=d7ec6aad047720508b23ca0d0f6e97fa99d55e36;hpb=6be6bc01c80959f94a8ef605662d35c812d88488;p=bertos.git diff --git a/bertos/cpu/detect.h b/bertos/cpu/detect.h index d7ec6aad..8dce9b8f 100644 --- a/bertos/cpu/detect.h +++ b/bertos/cpu/detect.h @@ -206,6 +206,14 @@ #define CPU_CM3_LM3S8962 0 #endif + #if defined (__ARM_STM32F100RB__) + #define CPU_CM3_STM32 1 + #define CPU_CM3_STM32F100RB 1 + #define CPU_NAME "STM32F100RB" + #else + #define CPU_CM3_STM32F100RB 0 + #endif + #if defined (__ARM_STM32F101C4__) #define CPU_CM3_STM32 1 #define CPU_CM3_STM32F101C4 1 @@ -214,6 +222,14 @@ #define CPU_CM3_STM32F101C4 0 #endif + #if defined (__ARM_STM32F102C4__) + #define CPU_CM3_STM32 1 + #define CPU_CM3_STM32F102C4 1 + #define CPU_NAME "STM32F102C4" + #else + #define CPU_CM3_STM32F102C4 0 + #endif + #if defined (__ARM_STM32F103RB__) #define CPU_CM3_STM32 1 #define CPU_CM3_STM32F103RB 1 @@ -295,7 +311,7 @@ #define CPU_CM3_STM32 0 #define CPU_CM3_SAM3 0 #elif defined (CPU_CM3_STM32) - #if CPU_CM3_STM32F101C4 + CPU_CM3_STM32F103RB + CPU_CM3_STM32F103RE + 0 != 1 + #if CPU_CM3_STM32F100RB + CPU_CM3_STM32F101C4 + CPU_CM3_STM32F103RB + CPU_CM3_STM32F103RE + CPU_CM3_STM32F102C4 + 0 != 1 #error STM32 Cortex-M3 CPU configuration error #endif #define CPU_CM3_LM3S 0 @@ -328,9 +344,10 @@ #define CPU_CM3_LM3S8962 0 #define CPU_CM3_STM32 0 + #define CPU_CM3_STM32F100RB 0 #define CPU_CM3_STM32F103RB 0 #define CPU_CM3_STM32F101C4 0 - #define CPU_CM3_STM32F103RE 0 + #define CPU_CM3_STM32F103RE 0 #define CPU_CM3_SAM3 0 #define CPU_CM3_SAM3N 0 @@ -402,6 +419,7 @@ #define CPU_CORE_NAME "AVR" #if defined(__AVR_ATmega32__) + #define CPU_AVR_MEGA 1 #define CPU_AVR_ATMEGA32 1 #define CPU_NAME "ATmega32" #else @@ -409,6 +427,7 @@ #endif #if defined(__AVR_ATmega64__) + #define CPU_AVR_MEGA 1 #define CPU_AVR_ATMEGA64 1 #define CPU_NAME "ATmega64" #else @@ -416,6 +435,7 @@ #endif #if defined(__AVR_ATmega103__) + #define CPU_AVR_MEGA 1 #define CPU_AVR_ATMEGA103 1 #define CPU_NAME "ATmega103" #else @@ -423,6 +443,7 @@ #endif #if defined(__AVR_ATmega128__) + #define CPU_AVR_MEGA 1 #define CPU_AVR_ATMEGA128 1 #define CPU_NAME "ATmega128" #else @@ -430,6 +451,7 @@ #endif #if defined(__AVR_ATmega8__) + #define CPU_AVR_MEGA 1 #define CPU_AVR_ATMEGA8 1 #define CPU_NAME "ATmega8" #else @@ -437,6 +459,7 @@ #endif #if defined(__AVR_ATmega168__) + #define CPU_AVR_MEGA 1 #define CPU_AVR_ATMEGA168 1 #define CPU_NAME "ATmega168" #else @@ -444,6 +467,7 @@ #endif #if defined(__AVR_ATmega328P__) + #define CPU_AVR_MEGA 1 #define CPU_AVR_ATMEGA328P 1 #define CPU_NAME "ATmega328P" #else @@ -451,6 +475,7 @@ #endif #if defined(__AVR_ATmega1281__) + #define CPU_AVR_MEGA 1 #define CPU_AVR_ATMEGA1281 1 #define CPU_NAME "ATmega1281" #else @@ -458,6 +483,7 @@ #endif #if defined(__AVR_ATmega1280__) + #define CPU_AVR_MEGA 1 #define CPU_AVR_ATMEGA1280 1 #define CPU_NAME "ATmega1280" #else @@ -465,19 +491,44 @@ #endif #if defined(__AVR_ATmega2560__) + #define CPU_AVR_MEGA 1 #define CPU_AVR_ATMEGA2560 1 #define CPU_NAME "ATmega2560" #else #define CPU_AVR_ATMEGA2560 0 #endif + #if defined(__AVR_ATxmega32D4__) + #define CPU_AVR_XMEGA 1 + #define CPU_AVR_XMEGA_D 1 + #define CPU_AVR_ATXMEGA32D4 1 + #define CPU_NAME "ATxmega32d4" + #else + #define CPU_AVR_ATXMEGA32D4 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 \ - + CPU_AVR_ATMEGA1280 + CPU_AVR_ATMEGA2560 != 1 + + CPU_AVR_ATMEGA1280 + CPU_AVR_ATMEGA2560 + CPU_AVR_ATXMEGA32D4 != 1 + #error AVR CPU configuration error + #endif + + #if defined(CPU_AVR_XMEGA) && defined(CPU_AVR_MEGA) + #error CPU cannot be MEGA and XMEGA + #elif defined(CPU_AVR_MEGA) + #define CPU_AVR_XMEGA 0 + #define CPU_AVR_XMEGA_D 0 + #elif defined(CPU_AVR_XMEGA) + #define CPU_AVR_MEGA 0 + #endif + + #if CPU_AVR_MEGA + CPU_AVR_XMEGA != 1 #error AVR CPU configuration error #endif + #else #define CPU_AVR 0 + #define CPU_AVR_MEGA 0 #define CPU_AVR_ATMEGA8 0 #define CPU_AVR_ATMEGA168 0 #define CPU_AVR_ATMEGA328P 0 @@ -488,6 +539,8 @@ #define CPU_AVR_ATMEGA1281 0 #define CPU_AVR_ATMEGA1280 0 #define CPU_AVR_ATMEGA2560 0 + #define CPU_AVR_XMEGA 0 + #define CPU_AVR_XMEGA_D 0 #endif #if defined (__MSP430__)