From 4ac24f561d0eeac46b4fe734c64b5569dd52bccf Mon Sep 17 00:00:00 2001 From: richardbarry Date: Thu, 13 Jan 2011 10:36:42 +0000 Subject: [PATCH] Add the .align, .asmfunc and .endasmfunc directives to the CCS MSP430X port layer. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1246 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/portable/CCS4/MSP430X/portext.asm | 36 ++++++++++++++++-------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/Source/portable/CCS4/MSP430X/portext.asm b/Source/portable/CCS4/MSP430X/portext.asm index 1e09101f7..5bbb4f19f 100644 --- a/Source/portable/CCS4/MSP430X/portext.asm +++ b/Source/portable/CCS4/MSP430X/portext.asm @@ -107,8 +107,9 @@ portRESTORE_CONTEXT .macro ;*/ .text + .align 2 -vPortPreemptiveTickISR: +vPortPreemptiveTickISR: .asmfunc ; The sr is not saved in portSAVE_CONTEXT() because vPortYield() needs ;to save it manually before it gets modified (interrupts get disabled). @@ -119,9 +120,12 @@ vPortPreemptiveTickISR: call_x #vTaskSwitchContext portRESTORE_CONTEXT + .endasmfunc ;----------------------------------------------------------- -vPortCooperativeTickISR: + .align 2 + +vPortCooperativeTickISR: .asmfunc ; The sr is not saved in portSAVE_CONTEXT() because vPortYield() needs ;to save it manually before it gets modified (interrupts get disabled). @@ -131,12 +135,17 @@ vPortCooperativeTickISR: call_x #vTaskIncrementTick portRESTORE_CONTEXT + + .endasmfunc ;----------------------------------------------------------- -;* -;* Manual context switch called by the portYIELD() macro. -;*/ -vPortYield: +; +; Manual context switch called by the portYIELD() macro. +; + + .align 2 + +vPortYield: .asmfunc ; The sr needs saving before it is modified. push.w sr @@ -153,14 +162,18 @@ vPortYield: ; Restore the context of the new task. portRESTORE_CONTEXT + .endasmfunc ;----------------------------------------------------------- -;* -;* Start off the scheduler by initialising the RTOS tick timer, then restoring -;* the context of the first task. -;* -xPortStartScheduler: +; +; Start off the scheduler by initialising the RTOS tick timer, then restoring +; the context of the first task. +; + + .align 2 + +xPortStartScheduler: .asmfunc ; Setup the hardware to generate the tick. Interrupts are disabled ; when this function is called. @@ -168,6 +181,7 @@ xPortStartScheduler: ; Restore the context of the first task that is going to run. portRESTORE_CONTEXT + .endasmfunc ;----------------------------------------------------------- .end -- 2.39.5