Update the IAR RX62N port files, which are now functional.

This commit is contained in:
Richard Barry 2010-08-29 17:12:12 +00:00
parent a418d78163
commit 5c75dd907e
3 changed files with 84 additions and 86 deletions

View file

@ -110,7 +110,7 @@
/* Only the current stack state is to be checked. */ /* Only the current stack state is to be checked. */
#define taskFIRST_CHECK_FOR_STACK_OVERFLOW() \ #define taskFIRST_CHECK_FOR_STACK_OVERFLOW() \
{ \ { \
extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \ extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \
\ \
/* Is the currently saved stack pointer within the stack limit? */ \ /* Is the currently saved stack pointer within the stack limit? */ \
if( pxCurrentTCB->pxTopOfStack >= pxCurrentTCB->pxEndOfStack ) \ if( pxCurrentTCB->pxTopOfStack >= pxCurrentTCB->pxEndOfStack ) \
@ -126,8 +126,8 @@
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \ #define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \
{ \ { \
extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \ extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \
static const unsigned char ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ static const unsigned char ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
@ -148,9 +148,9 @@
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \ #define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \
{ \ { \
extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \ extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \
char *pcEndOfStack = ( char * ) pxCurrentTCB->pxEndOfStack; \ char *pcEndOfStack = ( char * ) pxCurrentTCB->pxEndOfStack; \
static const unsigned char ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ static const unsigned char ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \

View file

@ -69,8 +69,8 @@
/* Tasks should start with interrupts enabled and in Supervisor mode, therefore /* Tasks should start with interrupts enabled and in Supervisor mode, therefore
PSW is set with U and I set, and PM and IPL clear. */ PSW is set with U and I set, and PM and IPL clear. */
#define portINITIAL_PSW ( ( portSTACK_TYPE ) 0x00030000 ) #define portINITIAL_PSW ( ( portSTACK_TYPE ) 0x00030000 )
#define portINITIAL_FPSW ( ( portSTACK_TYPE ) 0x00000100 ) #define portINITIAL_FPSW ( ( portSTACK_TYPE ) 0x00000100 )
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -188,7 +188,7 @@ extern void vApplicationSetupTimerInterrupt( void );
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
#pragma vector = VECT_CMT0_CMI0 #pragma vector = configTICK_VECTOR
__interrupt void vTickISR( void ) __interrupt void vTickISR( void )
{ {
/* Re-enable interrupts. */ /* Re-enable interrupts. */

View file

@ -52,7 +52,7 @@
*/ */
PUBLIC _prvStartFirstTask PUBLIC _prvStartFirstTask
PUBLIC _vSoftwareInterruptISR PUBLIC ___interrupt_27
EXTERN _pxCurrentTCB EXTERN _pxCurrentTCB
EXTERN _vTaskSwitchContext EXTERN _vTaskSwitchContext
@ -64,40 +64,41 @@ _prvStartFirstTask:
/* When starting the scheduler there is nothing that needs moving to the /* When starting the scheduler there is nothing that needs moving to the
interrupt stack because the function is not called from an interrupt. interrupt stack because the function is not called from an interrupt.
Just ensure the current stack is the user stack. */ Just ensure the current stack is the user stack. */
SETPSW U SETPSW U
/* Obtain the location of the stack associated with which ever task /* Obtain the location of the stack associated with which ever task
pxCurrentTCB is currently pointing to. */ pxCurrentTCB is currently pointing to. */
MOV.L #_pxCurrentTCB, R15 MOV.L #_pxCurrentTCB, R15
MOV.L [R15], R15 MOV.L [R15], R15
MOV.L [R15], R0 MOV.L [R15], R0
/* Restore the registers from the stack of the task pointed to by /* Restore the registers from the stack of the task pointed to by
pxCurrentTCB. */ pxCurrentTCB. */
POP R15 POP R15
/* Accumulator low 32 bits. */ /* Accumulator low 32 bits. */
MVTACLO R15 MVTACLO R15
POP R15 POP R15
/* Accumulator high 32 bits. */ /* Accumulator high 32 bits. */
MVTACHI R15 MVTACHI R15
POP R15 POP R15
/* Floating point status word. */ /* Floating point status word. */
MVTC R15, FPSW MVTC R15, FPSW
/* R1 to R15 - R0 is not included as it is the SP. */ /* R1 to R15 - R0 is not included as it is the SP. */
POPM R1-R15 POPM R1-R15
/* This pops the remaining registers. */ /* This pops the remaining registers. */
RTE RTE
NOP NOP
NOP NOP
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
_vSoftwareInterruptISR: /* The software interrupt - overwrite the default 'weak' definition. */
___interrupt_27:
/* Re-enable interrupts. */ /* Re-enable interrupts. */
SETPSW I SETPSW I
@ -112,7 +113,7 @@ _vSoftwareInterruptISR:
MVFC USP, R15 MVFC USP, R15
/* Move the address down to the data being moved. */ /* Move the address down to the data being moved. */
SUB #12, R15 SUB #12, R15
MVTC R15, USP MVTC R15, USP
/* Copy the data across, R15, then PC, then PSW. */ /* Copy the data across, R15, then PC, then PSW. */
@ -176,10 +177,7 @@ _vSoftwareInterruptISR:
NOP NOP
NOP NOP
/*:: i(configMAX_SYSCALL_INTERRUPT_PRIORITY), i(configKERNEL_INTERRUPT_PRIORITY)*/
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
END END