summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/stm32/stm32_vectors.S
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-03-10 00:02:11 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-03-10 00:02:11 +0000
commitebe8678619fe7bca2fd4f65830192a7559af46c3 (patch)
treea16f01389a0d8b50c40d7377d40b11255923ebf3 /nuttx/arch/arm/src/stm32/stm32_vectors.S
parent7960235bf41496b7d26d2362c9889c56c1e6415b (diff)
downloadpx4-nuttx-ebe8678619fe7bca2fd4f65830192a7559af46c3.tar.gz
px4-nuttx-ebe8678619fe7bca2fd4f65830192a7559af46c3.tar.bz2
px4-nuttx-ebe8678619fe7bca2fd4f65830192a7559af46c3.zip
Add peripheral support for the STM32 F2 family
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4471 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/stm32/stm32_vectors.S')
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_vectors.S12
1 files changed, 8 insertions, 4 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_vectors.S b/nuttx/arch/arm/src/stm32/stm32_vectors.S
index 1629dfc9f..b75237e40 100644
--- a/nuttx/arch/arm/src/stm32/stm32_vectors.S
+++ b/nuttx/arch/arm/src/stm32/stm32_vectors.S
@@ -145,6 +145,8 @@ stm32_vectors:
#if defined(CONFIG_STM32_STM32F10XX)
# include "chip/chip/stm32f10xxx_vectors.h"
+#elif defined(CONFIG_STM32_STM32F20XX)
+# include "chip/chip/stm32f20xxx_vectors.h"
#elif defined(CONFIG_STM32_STM32F40XX)
# include "chip/chip/stm32f40xxx_vectors.h"
#else
@@ -176,6 +178,8 @@ handlers:
#if defined(CONFIG_STM32_STM32F10XX)
# include "chip/chip/stm32f10xxx_vectors.h"
+#elif defined(CONFIG_STM32_STM32F20XX)
+# include "chip/chip/stm32f20xxx_vectors.h"
#elif defined(CONFIG_STM32_STM32F40XX)
# include "chip/chip/stm32f40xxx_vectors.h"
#else
@@ -204,7 +208,7 @@ stm32_common:
/* Complete the context save */
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_NUTTX_KERNEL
/* The EXC_RETURN value will be 0xfffffff9 (privileged thread) or 0xfffffff1
* (handler mode) if the state is on the MSP. It can only be on the PSP if
* EXC_RETURN is 0xfffffffd (unprivileged thread)
@@ -242,7 +246,7 @@ stm32_common:
* values.
*/
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_NUTTX_KERNEL
stmdb r1!, {r2-r11,r14} /* Save the remaining registers plus the SP value */
#else
stmdb r1!, {r2-r11} /* Save the remaining registers plus the SP value */
@@ -307,7 +311,7 @@ stm32_common:
ldmia r1, {r4-r11} /* Fetch eight registers in HW save area */
ldr r1, [r0, #(4*REG_SP)] /* R1=Value of SP before interrupt */
stmdb r1!, {r4-r11} /* Store eight registers in HW save area */
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_NUTTX_KERNEL
ldmia r0, {r2-r11,r14} /* Recover R4-R11, r14 + 2 temp values */
#else
ldmia r0, {r2-r11} /* Recover R4-R11 + 2 temp values */
@@ -321,7 +325,7 @@ stm32_common:
* r1 = Address of the return stack (same as r0)
*/
1:
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_NUTTX_KERNEL
ldmia r1!, {r2-r11,r14} /* Recover R4-R11, r14 + 2 temp values */
#else
ldmia r1!, {r2-r11} /* Recover R4-R11 + 2 temp values */