From 5ed6382942018d3bdb9d41de291ff5c3094ed5b5 Mon Sep 17 00:00:00 2001 From: arighi Date: Wed, 21 Apr 2010 13:55:25 +0000 Subject: [PATCH] CM3: ensure that all processes have eight-byte stack alignment. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3494 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/cortex-m3/scripts/lm3s1968_rom.ld | 6 +++--- bertos/cpu/types.h | 11 ++--------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/bertos/cpu/cortex-m3/scripts/lm3s1968_rom.ld b/bertos/cpu/cortex-m3/scripts/lm3s1968_rom.ld index e6c0e018..e0294b46 100644 --- a/bertos/cpu/cortex-m3/scripts/lm3s1968_rom.ld +++ b/bertos/cpu/cortex-m3/scripts/lm3s1968_rom.ld @@ -104,15 +104,15 @@ SECTIONS * Data heap is allocate at end of stack. */ PROVIDE (__msp_start = .); - . = ALIGN(4); + . = ALIGN(8); . += STACK_SIZE; PROVIDE (__msp_end = .); PROVIDE (__psp_start = .); - . = ALIGN(4); + . = ALIGN(8); . += STACK_SIZE; PROVIDE (__psp_end = .); PROVIDE (__heap_start = .); - . = ALIGN(4); + . = ALIGN(8); } diff --git a/bertos/cpu/types.h b/bertos/cpu/types.h index 3e56a360..d7e3e8bd 100644 --- a/bertos/cpu/types.h +++ b/bertos/cpu/types.h @@ -84,15 +84,8 @@ typedef uint32_t cpu_stack_t; #define SIZEOF_CPUSTACK_T 4 - #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 + typedef uint64_t cpu_aligned_stack_t; + #define SIZEOF_CPUALIGNED_T 8 #elif CPU_PPC -- 2.25.1