Further Cortex-M3 core related macros.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 30 Mar 2010 14:40:49 +0000 (14:40 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 30 Mar 2010 14:40:49 +0000 (14:40 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3333 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cfg/compiler.h
bertos/cpu/frame.h
bertos/cpu/types.h

index bd60c6e79b74f534688c4816526126f835cb2ef7..477094d224de1a3e39bd21b31e25b18c5be61b03 100644 (file)
@@ -448,7 +448,7 @@ typedef unsigned char page_t;    /**< Type for banked memory pages. */
        #if CPU_X86
                /* 32bit or 64bit (32bit for _WIN64). */
                typedef long ssize_t;
-       #elif CPU_ARM
+       #elif CPU_ARM || CPU_CM3
                typedef int ssize_t;
        #elif CPU_AVR
                /* 16bit (missing in avr-libc's sys/types.h). */
index e5c564686c7280895e488b452dd0a16fc28c17f8..9fd55b0b4b006eb94f3cc503c10017fe7a7ff991 100644 (file)
        #define CPU_STACK_GROWS_UPWARD 0
        #define CPU_SP_ON_EMPTY_SLOT   0
 
+#elif CPU_CM3
+
+       #define CPU_SAVED_REGS_CNT     fixme
+       #define CPU_STACK_GROWS_UPWARD 0
+       #define CPU_SP_ON_EMPTY_SLOT   0
+
 #elif CPU_PPC
 
        #define CPU_SAVED_REGS_CNT     1
index bb4aa79f2092982c9b414c865413462d7b5bea9f..3e56a360f08da48b56296c0d6ee853b79de09aa6 100644 (file)
                #define SIZEOF_CPUALIGNED_T SIZEOF_CPUSTACK_T
        #endif
 
-#elif CPU_ARM
+#elif CPU_ARM || CPU_CM3
 
        typedef uint32_t cpu_flags_t;
        typedef uint32_t cpu_atomic_t;
        typedef uint32_t cpu_stack_t;
-       typedef uint64_t cpu_aligned_stack_t;
        #define SIZEOF_CPUSTACK_T 4
-       #define SIZEOF_CPUALIGNED_T 8
+
+       #if CPU_ARM
+               typedef uint64_t cpu_aligned_stack_t;
+               #define SIZEOF_CPUALIGNED_T 8
+       #elif CPU_CM3
+               typedef uint32_t cpu_aligned_stack_t;
+               #define SIZEOF_CPUALIGNED_T 4
+       #else
+               #error CPU configuration error
+       #endif
 
 #elif CPU_PPC