From: asterix Date: Fri, 22 Oct 2010 19:59:56 +0000 (+0000) Subject: Fix msp430 cpu core name. Add new msp430 core detect. X-Git-Tag: 2.6.0~5^2~69 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=bfe473a7e8951b16edbd6559b828a37e6ce378aa;p=bertos.git Fix msp430 cpu core name. Add new msp430 core detect. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4451 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/detect.h b/bertos/cpu/detect.h index 4d172395..985d18e1 100644 --- a/bertos/cpu/detect.h +++ b/bertos/cpu/detect.h @@ -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__) @@ -444,16 +444,29 @@ #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