diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-20 10:09:53 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-20 10:09:53 +0000 |
commit | 2bbf9f1ea0cfb30bf61d189cc8c5f3552b363f01 (patch) | |
tree | 770216e8d10de3a908aa6f08fdefe340795be38e /os/rt/ports/ARMCMx/compilers/GCC | |
parent | 706f6a3967f968ea92fb1eb1b44741245dafd190 (diff) | |
download | ChibiOS-2bbf9f1ea0cfb30bf61d189cc8c5f3552b363f01.tar.gz ChibiOS-2bbf9f1ea0cfb30bf61d189cc8c5f3552b363f01.tar.bz2 ChibiOS-2bbf9f1ea0cfb30bf61d189cc8c5f3552b363f01.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6185 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/ports/ARMCMx/compilers/GCC')
-rw-r--r-- | os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v6m.s | 61 | ||||
-rw-r--r-- | os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s | 6 | ||||
-rw-r--r-- | os/rt/ports/ARMCMx/compilers/GCC/ld/STM32F051x8.ld | 7 |
3 files changed, 34 insertions, 40 deletions
diff --git a/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v6m.s b/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v6m.s index 36864a2c9..a8c0d34cf 100644 --- a/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v6m.s +++ b/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v6m.s @@ -44,14 +44,10 @@ .set CONTEXT_OFFSET, 12
.set SCB_ICSR, 0xE000ED04
.set ICSR_PENDSVSET, 0x10000000
+ .set ICSR_NMIPENDSET, 0x80000000
- .syntax unified
- .cpu cortex-m4
-#if CORTEX_USE_FPU
- .fpu fpv4-sp-d16
-#else
- .fpu softvfp
-#endif
+ .cpu cortex-m0
+ .fpu softvfp
.thumb
.text
@@ -62,16 +58,22 @@ .thumb_func
.globl _port_switch
_port_switch:
- push {r4, r5, r6, r7, r8, r9, r10, r11, lr}
-#if CORTEX_USE_FPU
- vpush {s16-s31}
-#endif
- str sp, [r1, #CONTEXT_OFFSET]
- ldr sp, [r0, #CONTEXT_OFFSET]
-#if CORTEX_USE_FPU
- vpop {s16-s31}
-#endif
- pop {r4, r5, r6, r7, r8, r9, r10, r11, pc}
+ push {r4, r5, r6, r7, lr}
+ mov r4, r8
+ mov r5, r9
+ 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
+ pop {r4, r5, r6, r7}
+ mov r8, r4
+ mov r9, r5
+ mov r10, r6
+ mov r11, r7
+ pop {r4, r5, r6, r7, pc}
/*--------------------------------------------------------------------------*
* Start a thread by invoking its work function.
@@ -90,12 +92,7 @@ _port_thread_start: #if CH_DBG_STATISTICS
bl _stats_stop_measure_crit_thd
#endif
-#if !CORTEX_SIMPLIFIED_PRIORITY
- movs r3, #0
- msr BASEPRI, r3
-#else /* CORTEX_SIMPLIFIED_PRIORITY */
cpsie i
-#endif /* CORTEX_SIMPLIFIED_PRIORITY */
mov r0, r5
blx r4
bl chThdExit
@@ -123,17 +120,21 @@ _port_switch_from_isr: #endif
.globl _port_exit_from_isr
_port_exit_from_isr:
-#if CORTEX_SIMPLIFIED_PRIORITY
- movw r3, #:lower16:SCB_ICSR
- movt r3, #:upper16:SCB_ICSR
- mov r2, ICSR_PENDSVSET
- str r2, [r3, #0]
+ ldr r3, .L2
+ ldr r2, .L3
+#if CORTEX_ALTERNATE_SWITCH
cpsie i
-#else /* !CORTEX_SIMPLIFIED_PRIORITY */
- svc #0
-#endif /* !CORTEX_SIMPLIFIED_PRIORITY */
+#endif
.L1: b .L1
+ .align 2
+.L2: .word SCB_ICSR
+#if CORTEX_ALTERNATE_SWITCH
+.L3: .word ICSR_PENDSVSET
+#else
+.L3: .word ICSR_NMIPENDSET
+#endif
+
#endif /* !defined(__DOXYGEN__) */
/** @} */
diff --git a/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s b/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s index 36864a2c9..8e3a913e7 100644 --- a/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s +++ b/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s @@ -46,11 +46,11 @@ .set ICSR_PENDSVSET, 0x10000000
.syntax unified
- .cpu cortex-m4
+ .cpu cortex-m4
#if CORTEX_USE_FPU
- .fpu fpv4-sp-d16
+ .fpu fpv4-sp-d16
#else
- .fpu softvfp
+ .fpu softvfp
#endif
.thumb
diff --git a/os/rt/ports/ARMCMx/compilers/GCC/ld/STM32F051x8.ld b/os/rt/ports/ARMCMx/compilers/GCC/ld/STM32F051x8.ld index 69684e5cf..31c34bbf2 100644 --- a/os/rt/ports/ARMCMx/compilers/GCC/ld/STM32F051x8.ld +++ b/os/rt/ports/ARMCMx/compilers/GCC/ld/STM32F051x8.ld @@ -16,13 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- ---
-
- A special exception to the GPL can be applied should you wish to distribute
- a combined work that includes ChibiOS/RT, without being obliged to provide
- the source code for any proprietary components. See the file exception.txt
- for full details of how and when the exception can be applied.
*/
/*
|