From: richardbarry Date: Thu, 23 Dec 2010 10:39:02 +0000 (+0000) Subject: Add an cpsie i before the SVC call that starts the scheduler. This is just in case... X-Git-Tag: V6.1.1~77 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0bbae53681ea9cec36b9f774e5de186a430164ac;p=freertos Add an cpsie i before the SVC call that starts the scheduler. This is just in case the C start up code leaves interrupts globally disabled. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1180 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Source/portable/GCC/ARM_CM3/port.c b/Source/portable/GCC/ARM_CM3/port.c index 6f35e6dd5..85d28c6ec 100644 --- a/Source/portable/GCC/ARM_CM3/port.c +++ b/Source/portable/GCC/ARM_CM3/port.c @@ -155,7 +155,9 @@ void vPortStartFirstTask( void ) " ldr r0, [r0] \n" " ldr r0, [r0] \n" " msr msp, r0 \n" /* Set the msp back to the start of the stack. */ + " cpsie i \n" " svc 0 \n" /* System call to start first task. */ + " nop \n" ); } /*-----------------------------------------------------------*/ diff --git a/Source/portable/IAR/ARM_CM3/portasm.s b/Source/portable/IAR/ARM_CM3/portasm.s index 1c81b3f15..eac17be54 100644 --- a/Source/portable/IAR/ARM_CM3/portasm.s +++ b/Source/portable/IAR/ARM_CM3/portasm.s @@ -33,9 +33,9 @@ FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. You should have received a copy of the GNU General Public - License and the FreeRTOS license exception along with FreeRTOS; if not it - can be viewed here: http://www.freertos.org/a00114.html and also obtained + more details. You should have received a copy of the GNU General Public + License and the FreeRTOS license exception along with FreeRTOS; if not it + can be viewed here: http://www.freertos.org/a00114.html and also obtained by writing to Richard Barry, contact details for whom are available on the FreeRTOS WEB site. @@ -51,13 +51,6 @@ licensing and training services. */ -/* - Change from V4.2.1: - - + Introduced usage of configKERNEL_INTERRUPT_PRIORITY macro to set the - interrupt priority used by the kernel. -*/ - #include /* For backward compatibility, ensure configKERNEL_INTERRUPT_PRIORITY is @@ -157,6 +150,7 @@ vPortStartFirstTask /* Set the msp back to the start of the stack. */ msr msp, r0 /* Call SVC to start the first task. */ + cpsie i svc 0 END diff --git a/Source/portable/RVDS/ARM_CM3/port.c b/Source/portable/RVDS/ARM_CM3/port.c index 0288b76a6..c864f821a 100644 --- a/Source/portable/RVDS/ARM_CM3/port.c +++ b/Source/portable/RVDS/ARM_CM3/port.c @@ -149,7 +149,9 @@ __asm void vPortStartFirstTask( void ) /* Set the msp back to the start of the stack. */ msr msp, r0 /* Call SVC to start the first task. */ + cpsie i svc 0 + nop } /*-----------------------------------------------------------*/