diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-11 14:23:49 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-11 14:23:49 +0000 |
commit | 91c66742882c9eb33f7bef2775935b1c9190c78b (patch) | |
tree | 280ea2dd6d03479c0faaf7d7a1ad0af2355444df /os/nil/ports | |
parent | 72590590cb302efc52788d11df5569db55e0be73 (diff) | |
download | ChibiOS-91c66742882c9eb33f7bef2775935b1c9190c78b.tar.gz ChibiOS-91c66742882c9eb33f7bef2775935b1c9190c78b.tar.bz2 ChibiOS-91c66742882c9eb33f7bef2775935b1c9190c78b.zip |
Enhanced startups for ARMCMx.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7757 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/nil/ports')
10 files changed, 24 insertions, 14 deletions
diff --git a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm0.mk b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm0.mk index 3561841ef..7cdf3f5f1 100644 --- a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm0.mk +++ b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm0.mk @@ -4,7 +4,8 @@ PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \ ${CHIBIOS}/os/nil/ports/ARMCMx/nilcore.c \
${CHIBIOS}/os/nil/ports/ARMCMx/nilcore_v6m.c
-PORTASM = $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v6m.s
+PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v6m.s \
+ $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v6m.s
PORTINC = ${CHIBIOS}/os/ext/CMSIS/include \
${CHIBIOS}/os/nil/ports/ARMCMx \
diff --git a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm4.mk b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm4.mk index 81179a65b..4449d4c14 100644 --- a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm4.mk +++ b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm4.mk @@ -4,7 +4,8 @@ PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \ ${CHIBIOS}/os/nil/ports/ARMCMx/nilcore.c \
${CHIBIOS}/os/nil/ports/ARMCMx/nilcore_v7m.c
-PORTASM = $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s
+PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s \
+ $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s
PORTINC = ${CHIBIOS}/os/ext/CMSIS/include \
${CHIBIOS}/os/nil/ports/ARMCMx \
diff --git a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk index 6e63c076c..c32001f78 100644 --- a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk +++ b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk @@ -4,7 +4,8 @@ PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \ ${CHIBIOS}/os/nil/ports/ARMCMx/nilcore.c \
${CHIBIOS}/os/nil/ports/ARMCMx/nilcore_v6m.c
-PORTASM = $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v6m.s
+PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v6m.s \
+ $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v6m.s
PORTINC = ${CHIBIOS}/os/ext/CMSIS/include \
${CHIBIOS}/os/ext/CMSIS/ST \
diff --git a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f1xx.mk b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f1xx.mk index 742053e48..c6e7f97b9 100644 --- a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f1xx.mk +++ b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f1xx.mk @@ -4,7 +4,8 @@ PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \ ${CHIBIOS}/os/nil/ports/ARMCMx/nilcore.c \
${CHIBIOS}/os/nil/ports/ARMCMx/nilcore_v7m.c
-PORTASM = $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s
+PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s \
+ $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s
PORTINC = ${CHIBIOS}/os/ext/CMSIS/include \
${CHIBIOS}/os/ext/CMSIS/ST \
diff --git a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f37x.mk b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f37x.mk index c27680266..efef95e7b 100644 --- a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f37x.mk +++ b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f37x.mk @@ -4,7 +4,8 @@ PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \ ${CHIBIOS}/os/nil/ports/ARMCMx/nilcore.c \
${CHIBIOS}/os/nil/ports/ARMCMx/nilcore_v7m.c
-PORTASM = $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s
+PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s \
+ $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s
PORTINC = ${CHIBIOS}/os/ext/CMSIS/include \
${CHIBIOS}/os/ext/CMSIS/ST \
diff --git a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f3xx.mk b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f3xx.mk index 2c02987dc..339b0e5bf 100644 --- a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f3xx.mk +++ b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f3xx.mk @@ -4,7 +4,8 @@ PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \ ${CHIBIOS}/os/nil/ports/ARMCMx/nilcore.c \
${CHIBIOS}/os/nil/ports/ARMCMx/nilcore_v7m.c
-PORTASM = $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s
+PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s \
+ $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s
PORTINC = ${CHIBIOS}/os/ext/CMSIS/include \
${CHIBIOS}/os/ext/CMSIS/ST \
diff --git a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk index e7973f9c0..08da6ab52 100644 --- a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk +++ b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk @@ -4,7 +4,8 @@ PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \ ${CHIBIOS}/os/nil/ports/ARMCMx/nilcore.c \
${CHIBIOS}/os/nil/ports/ARMCMx/nilcore_v7m.c
-PORTASM = $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s
+PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s \
+ $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s
PORTINC = ${CHIBIOS}/os/ext/CMSIS/include \
${CHIBIOS}/os/ext/CMSIS/ST \
diff --git a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk index 12894b1c0..5afafe7db 100644 --- a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk +++ b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk @@ -4,7 +4,8 @@ PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \ ${CHIBIOS}/os/nil/ports/ARMCMx/nilcore.c \
${CHIBIOS}/os/nil/ports/ARMCMx/nilcore_v7m.c
-PORTASM = $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s
+PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s \
+ $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s
PORTINC = ${CHIBIOS}/os/ext/CMSIS/include \
${CHIBIOS}/os/ext/CMSIS/ST \
diff --git a/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v6m.s b/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v6m.s index 1303eae55..a80a6ee71 100644 --- a/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v6m.s +++ b/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v6m.s @@ -62,10 +62,12 @@ _port_switch: mov r6, r10
mov r7, r11
push {r4, r5, r6, r7}
- mov r3, sp
- str r3, [r1, #CONTEXT_OFFSET]
- ldr r3, [r0, #CONTEXT_OFFSET]
- mov sp, r3
+
+ mov r3, sp
+ str r3, [r1, #CONTEXT_OFFSET]
+ ldr r3, [r0, #CONTEXT_OFFSET]
+ mov sp, r3
+
pop {r4, r5, r6, r7}
mov r8, r4
mov r9, r5
diff --git a/os/nil/ports/ARMCMx/nilcore_v7m.c b/os/nil/ports/ARMCMx/nilcore_v7m.c index beb9dc393..c381fc3ef 100644 --- a/os/nil/ports/ARMCMx/nilcore_v7m.c +++ b/os/nil/ports/ARMCMx/nilcore_v7m.c @@ -65,7 +65,7 @@ void SVC_Handler(void) { #if CORTEX_USE_FPU == TRUE
/* Enforcing unstacking of the FP part of the context.*/
- SCB_FPCCR &= ~FPCCR_LSPACT;
+ FPU->FPCCR &= ~FPU_FPCCR_LSPACT_Msk;
#endif
/* The port_extctx structure is pointed by the PSP register.*/
@@ -97,7 +97,7 @@ void PendSV_Handler(void) { #if CORTEX_USE_FPU == TRUE
/* Enforcing unstacking of the FP part of the context.*/
- SCB_FPCCR &= ~FPCCR_LSPACT;
+ FPU->FPCCR &= ~FPU_FPCCR_LSPACT_Msk;
#endif
/* The port_extctx structure is pointed by the PSP register.*/
|