projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lm3s1968: return the correct CPU frequency in clock_get_rate().
[bertos.git]
/
bertos
/
cpu
/
detect.h
diff --git
a/bertos/cpu/detect.h
b/bertos/cpu/detect.h
index c6de054b189732fcbec2a8d0507232dffde62bf1..3c4712d25f1fd72f8fbcfcd7657f75274a05d0b3 100644
(file)
--- a/
bertos/cpu/detect.h
+++ b/
bertos/cpu/detect.h
@@
-39,7
+39,13
@@
#if defined(__arm__) /* GCC */ \
|| defined(__ARM4TM__) /* IAR: defined for all cores >= 4tm */
#define CPU_ARM 1
#if defined(__arm__) /* GCC */ \
|| defined(__ARM4TM__) /* IAR: defined for all cores >= 4tm */
#define CPU_ARM 1
- #define CPU_ID arm
+
+ // Cortex-M3 core family
+ #if defined(__ARM_LM3S1968__)
+ #define CPU_ID lm3s
+ #else
+ #define CPU_ID arm
+ #endif
// AT91SAM7S core family
#if defined(__ARM_AT91SAM7S32__)
// AT91SAM7S core family
#if defined(__ARM_AT91SAM7S32__)
@@
-114,6
+120,13
@@
#define CPU_ARM_LM3S1968 0
#endif
#define CPU_ARM_LM3S1968 0
#endif
+ #if defined(__ARM_LPC2378__)
+ #define CPU_ARM_LPC2 1
+ #define CPU_ARM_LPC2378 1
+ #else
+ #define CPU_ARM_LPC2378 0
+ #endif
+
#if !defined(CPU_ARM_SAM7S_LARGE)
#define CPU_ARM_SAM7S_LARGE 0
#endif
#if !defined(CPU_ARM_SAM7S_LARGE)
#define CPU_ARM_SAM7S_LARGE 0
#endif
@@
-132,20
+145,31
@@
#error ARM CPU configuration error
#endif
#define CPU_ARM_LM3S 0
#error ARM CPU configuration error
#endif
#define CPU_ARM_LM3S 0
+ #define CPU_ARM_LPC2 0
#elif defined (CPU_ARM_LM3S)
#if CPU_ARM_LM3S1968 + 0 != 1
#error Luminary ARM CPU configuration error
#endif
#define CPU_ARM_AT91 0
#elif defined (CPU_ARM_LM3S)
#if CPU_ARM_LM3S1968 + 0 != 1
#error Luminary ARM CPU configuration error
#endif
#define CPU_ARM_AT91 0
+ #define CPU_ARM_LPC2 0
+ #elif defined (CPU_ARM_LPC2)
+
+ #if CPU_ARM_LPC2378 + 0 != 1
+ #error NXP LPC2xxx ARM CPU configuration error
+ #endif
+ #define CPU_ARM_AT91 0
+ #define CPU_ARM_LM3S 0
/* #elif Add other ARM families here */
#else
#define CPU_ARM_AT91 0
#define CPU_ARM_LM3S 0
/* #elif Add other ARM families here */
#else
#define CPU_ARM_AT91 0
#define CPU_ARM_LM3S 0
+ #define CPU_ARM_LPC2 0
#endif
#endif
- #if CPU_ARM_AT91 + CPU_ARM_LM3S + 0 /* Add other ARM families here */ != 1
+ #if CPU_ARM_AT91 + CPU_ARM_LM3S \
+ + CPU_ARM_LPC2 + 0 /* Add other ARM families here */ != 1
#error ARM CPU configuration error
#endif
#else
#error ARM CPU configuration error
#endif
#else
@@
-154,6
+178,7
@@
/* ARM Families */
#define CPU_ARM_AT91 0
#define CPU_ARM_LM3S 0
/* ARM Families */
#define CPU_ARM_AT91 0
#define CPU_ARM_LM3S 0
+ #define CPU_ARM_LPC2 0
/* SAM7 sub-families */
#define CPU_ARM_SAM7S_LARGE 0
/* SAM7 sub-families */
#define CPU_ARM_SAM7S_LARGE 0
@@
-170,6
+195,8
@@
#define CPU_ARM_AT91SAM7X512 0
#define CPU_ARM_LM3S1968 0
#define CPU_ARM_AT91SAM7X512 0
#define CPU_ARM_LM3S1968 0
+
+ #define CPU_ARM_LPC2378 0
#endif
#if (defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)) \
#endif
#if (defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)) \
@@
-285,7
+312,7
@@
#define CPU_AVR 0
#define CPU_AVR_ATMEGA8 0
#define CPU_AVR_ATMEGA168 0
#define CPU_AVR 0
#define CPU_AVR_ATMEGA8 0
#define CPU_AVR_ATMEGA168 0
- #define CPU_AVR_ATMEGA328P
0
+ #define CPU_AVR_ATMEGA328P 0
#define CPU_AVR_ATMEGA32 0
#define CPU_AVR_ATMEGA64 0
#define CPU_AVR_ATMEGA103 0
#define CPU_AVR_ATMEGA32 0
#define CPU_AVR_ATMEGA64 0
#define CPU_AVR_ATMEGA103 0