mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-02 04:13:54 -04:00
Start to adjust to support both small and large memory models in the MSP430X IAR port layer.
This commit is contained in:
parent
19fcd2d505
commit
d195639bc1
4 changed files with 92 additions and 55 deletions
|
@ -52,16 +52,47 @@
|
|||
*/
|
||||
#include "msp430.h"
|
||||
#include "FreeRTOSConfig.h"
|
||||
#include "portasm.h"
|
||||
#include "data_model.h"
|
||||
|
||||
IMPORT vTaskIncrementTick
|
||||
IMPORT vTaskSwitchContext
|
||||
IMPORT vPortSetupTimerInterrupt
|
||||
IMPORT pxCurrentTCB
|
||||
IMPORT usCriticalNesting
|
||||
|
||||
EXPORT vPortTickISR
|
||||
EXPORT vPortYield
|
||||
EXPORT xPortStartScheduler
|
||||
|
||||
portSAVE_CONTEXT macro
|
||||
|
||||
/* Save the remaining registers. */
|
||||
pushm_x #12, r15
|
||||
mov.w &usCriticalNesting, r14
|
||||
push_x r14
|
||||
mov_x &pxCurrentTCB, r12
|
||||
mov_x sp, 0( r12 )
|
||||
endm
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
portRESTORE_CONTEXT macro
|
||||
|
||||
mov_x &pxCurrentTCB, r12
|
||||
mov_x @r12, sp
|
||||
pop_x r15
|
||||
mov.w r15, &usCriticalNesting
|
||||
popm_x #12, r15
|
||||
|
||||
/* The last thing on the stack will be the status register.
|
||||
Ensure the power down bits are clear ready for the next
|
||||
time this power down register is popped from the stack. */
|
||||
bic.w #0xf0, 0( sp )
|
||||
|
||||
pop.w sr
|
||||
reta
|
||||
endm
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
/*
|
||||
* The RTOS tick ISR.
|
||||
|
@ -72,7 +103,7 @@
|
|||
* If the preemptive scheduler is in use a context switch can also occur.
|
||||
*/
|
||||
|
||||
RSEG ISR_CODE
|
||||
RSEG CODE
|
||||
|
||||
vPortTickISR:
|
||||
|
||||
|
@ -90,8 +121,6 @@ vPortTickISR:
|
|||
portRESTORE_CONTEXT
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
RSEG CODE
|
||||
|
||||
/*
|
||||
* Manual context switch called by the portYIELD() macro.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue