Add AT91 ARM CPU recognition.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 11 Oct 2007 14:10:30 +0000 (14:10 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 11 Oct 2007 14:10:30 +0000 (14:10 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@849 38d2e660-2303-0410-9eaa-f027e97ec537

cpu/detect.h

index 1eb6c1385908b91efc1fa03cb31f2aeec5398f01..dd0e801fa74b148f78f9193b1cbf7fca2b124c0b 100644 (file)
@@ -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
  *
  * -->
        || 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)) \
        #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