Fix msp430 cpu core name. Add new msp430 core detect.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 22 Oct 2010 19:59:56 +0000 (19:59 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 22 Oct 2010 19:59:56 +0000 (19:59 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4451 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cpu/detect.h

index 4d1723952ddb98b7ba1b0d68c40875d2b167ecf8..985d18e124df71e9bf529c454e576cc3a485c5a8 100644 (file)
@@ -40,7 +40,7 @@
        || defined(__ARM4TM__) /* IAR: defined for all cores >= 4tm */
        #define CPU_ARM 1
        #define CPU_ID  arm
-       #define CPU_CORE_NAME            "ARM7TDMI"
+       #define CPU_CORE_NAME            "ARM7TDMI"
 
        // AT91SAM7S core family
        #if defined(__ARM_AT91SAM7S32__)
 #if defined (__MSP430__)
        #define CPU_MSP430              1
        #define CPU_ID                  msp430
-       #define CPU_CORE_NAME           "MSP430F2274"
+       #define CPU_CORE_NAME           "MSP430"
 
-       #if defined(__MSP430_2274__)
-               #define CPU_MSP430_2274     1
-               #define CPU_NAME            "2274"
+       #if defined(__MSP430F2274__)
+               #define CPU_MSP430F2274     1
+               #define CPU_NAME            "MSP430F2274"
        #else
-               #define CPU_MSP430_2274     0
+               #define CPU_MSP430F2274     0
+       #endif
+
+       #if defined(__MSP430G2231__)
+               #define CPU_MSP430G2231     1
+               #define CPU_NAME            "MSP430G2231"
+       #else
+               #define CPU_MSP430G2231     0
+       #endif
+
+       #if CPU_MSP430F2274 + CPU_MSP430G2231 != 1
+               #error MSP430 CPU configuration error
        #endif
 #else
-       #define CPU_MSP430              0
+       #define CPU_MSP430                  0
+       #define CPU_MSP430F2274             0
+       #define CPU_MSP430G2231             0
 #endif