From 50cc352d570076bb1c5e6a79764da95681ef0887 Mon Sep 17 00:00:00 2001 From: batt Date: Thu, 11 Oct 2007 14:10:30 +0000 Subject: [PATCH] Add AT91 ARM CPU recognition. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@849 38d2e660-2303-0410-9eaa-f027e97ec537 --- cpu/detect.h | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/cpu/detect.h b/cpu/detect.h index 1eb6c138..dd0e801f 100644 --- a/cpu/detect.h +++ b/cpu/detect.h @@ -26,7 +26,7 @@ * invalidate any other reasons why the executable file might be covered by * the GNU General Public License. * - * Copyright 2004, 2005 Develer S.r.l. (http://www.develer.com/) + * Copyright 2004, 2005, 2006, 2007 Develer S.r.l. (http://www.develer.com/) * Copyright 2004 Giovanni Bajo * * --> @@ -40,8 +40,58 @@ || defined(__ARM4TM__) /* IAR: defined for all cores >= 4tm */ #define CPU_ARM 1 #define CPU_ID arm + + #if defined(__ARM_AT91SAM7S32__) + #define CPU_ARM_AT91 1 + #define CPU_ARM_AT91SAM7S32 1 + #else + #define CPU_ARM_AT91 0 + #define CPU_ARM_AT91SAM7S32 0 + #endif + + #if defined(__ARM_AT91SAM7S64__) + #define CPU_ARM_AT91 1 + #define CPU_ARM_AT91SAM7S64 1 + #else + #define CPU_ARM_AT91 0 + #define CPU_ARM_AT91SAM7S64 0 + #endif + + #if defined(__ARM_AT91SAM7S128__) + #define CPU_ARM_AT91 1 + #define CPU_ARM_AT91SAM7S128 1 + #else + #define CPU_ARM_AT91 0 + #define CPU_ARM_AT91SAM7S128 0 + #endif + + #if defined(__ARM_AT91SAM7S256__) + #define CPU_ARM_AT91 1 + #define CPU_ARM_AT91SAM7S256 1 + #else + #define CPU_ARM_AT91 0 + #define CPU_ARM_AT91SAM7S256 0 + #endif + + #if CPU_ARM_AT91SAM7S32 + CPU_ARM_AT91SAM7S64 \ + + CPU_ARM_AT91SAM7S128 + CPU_ARM_AT91SAM7S256 != 1 + #error ARM CPU configuration error + #endif + + #if CPU_ARM_AT91 + 0 /* Add other ARM families here */ != 1 + #error ARM CPU configuration error + #endif #else #define CPU_ARM 0 + + /* ARM Families */ + #define CPU_ARM_AT91 0 + + /* ARM CPUs */ + #define CPU_ARM_AT91SAM7S32 0 + #define CPU_ARM_AT91SAM7S64 0 + #define CPU_ARM_AT91SAM7S128 0 + #define CPU_ARM_AT91SAM7S256 0 #endif #if (defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)) \ @@ -136,6 +186,11 @@ #else #define CPU_AVR_ATMEGA1281 0 #endif + + #if CPU_AVR_ATMEGA64 + CPU_AVR_ATMEGA103 + CPU_AVR_ATMEGA128 \ + + CPU_AVR_ATMEGA8 + CPU_AVR_ATMEGA168 + CPU_AVR_ATMEGA1281 != 1 + #error AVR CPU configuration error + #endif #else #define CPU_AVR 0 #define CPU_AVR_ATMEGA8 0 -- 2.25.1