mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-12 09:07:46 -04:00
Style: Make Renesas RXv3 DPFPU port layer consistent with uncrustify.
Add '/* *INDENT-OFF* */' and '/* *INDENT-ON* */' around inline assembly code in C source files.
Add '; /* *INDENT-OFF* */' at the top of assembly source file.
Remove '1 tab == 4 spaces!'.
Change tab to spaces.
Beautification by uncrustify.
Beautification by hand (no conflict with uncrustify).
Fix inconsistency which I didn't notice at the commit 386d854
: DFPU --> DPFPU.
No changes are caused in the MOT and SREC files which are built.
This commit is contained in:
parent
1d8df4752e
commit
968759135e
7 changed files with 803 additions and 783 deletions
|
@ -22,14 +22,13 @@
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://github.com/FreeRTOS
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
* 1 tab == 4 spaces!
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*-----------------------------------------------------------
|
/*-----------------------------------------------------------
|
||||||
* Implementation of functions defined in portable.h for the RXv3 DPFPU port.
|
* Implementation of functions defined in portable.h for the RXv3 DPFPU port.
|
||||||
*----------------------------------------------------------*/
|
*----------------------------------------------------------*/
|
||||||
|
|
||||||
#warning Testing for DFPU support in this port is not yet complete
|
#warning Testing for DPFPU support in this port is not yet complete
|
||||||
|
|
||||||
/* Scheduler includes. */
|
/* Scheduler includes. */
|
||||||
#include "FreeRTOS.h"
|
#include "FreeRTOS.h"
|
||||||
|
@ -40,14 +39,10 @@
|
||||||
|
|
||||||
/* Hardware specifics. */
|
/* Hardware specifics. */
|
||||||
#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )
|
#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )
|
||||||
|
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
#else
|
||||||
#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
|
||||||
|
|
||||||
#include "iodefine.h"
|
#include "iodefine.h"
|
||||||
|
#endif
|
||||||
#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -96,11 +91,11 @@ static void prvStartFirstTask( void ) __attribute__( ( naked ) );
|
||||||
R_BSP_PRAGMA_INTERRUPT( vSoftwareInterruptISR, VECT( ICU, SWINT ) )
|
R_BSP_PRAGMA_INTERRUPT( vSoftwareInterruptISR, VECT( ICU, SWINT ) )
|
||||||
R_BSP_ATTRIB_INTERRUPT void vSoftwareInterruptISR( void ) __attribute__( ( naked ) );
|
R_BSP_ATTRIB_INTERRUPT void vSoftwareInterruptISR( void ) __attribute__( ( naked ) );
|
||||||
|
|
||||||
#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
#else
|
||||||
|
|
||||||
void vSoftwareInterruptISR( void ) __attribute__( ( naked ) );
|
void vSoftwareInterruptISR( void ) __attribute__( ( naked ) );
|
||||||
|
|
||||||
#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The tick ISR handler. The peripheral used is configured by the application
|
* The tick ISR handler. The peripheral used is configured by the application
|
||||||
|
@ -111,11 +106,11 @@ static void prvStartFirstTask( void ) __attribute__( ( naked ) );
|
||||||
R_BSP_PRAGMA_INTERRUPT( vTickISR, _VECT( configTICK_VECTOR ) )
|
R_BSP_PRAGMA_INTERRUPT( vTickISR, _VECT( configTICK_VECTOR ) )
|
||||||
R_BSP_ATTRIB_INTERRUPT void vTickISR( void ); /* Do not add __attribute__( ( interrupt ) ). */
|
R_BSP_ATTRIB_INTERRUPT void vTickISR( void ); /* Do not add __attribute__( ( interrupt ) ). */
|
||||||
|
|
||||||
#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
#else
|
||||||
|
|
||||||
void vTickISR( void ) __attribute__( ( interrupt ) );
|
void vTickISR( void ) __attribute__( ( interrupt ) );
|
||||||
|
|
||||||
#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
#endif
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -125,7 +120,7 @@ static void prvStartFirstTask( void ) __attribute__( ( naked ) );
|
||||||
|
|
||||||
StackType_t ulPortTaskHasDPFPUContext = portNO_DPFPU_CONTEXT;
|
StackType_t ulPortTaskHasDPFPUContext = portNO_DPFPU_CONTEXT;
|
||||||
|
|
||||||
#endif /* configUSE_TASK_DPFPU_SUPPORT */
|
#endif
|
||||||
|
|
||||||
/* This is accessed by the inline assembler functions so is file scope for
|
/* This is accessed by the inline assembler functions so is file scope for
|
||||||
* convenience. */
|
* convenience. */
|
||||||
|
@ -270,11 +265,11 @@ StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
|
||||||
{
|
{
|
||||||
/* Omit DPFPU support. */
|
/* Omit DPFPU support. */
|
||||||
}
|
}
|
||||||
#else /* if ( configUSE_TASK_DPFPU_SUPPORT == 1 ) */
|
#else /* configUSE_TASK_DPFPU_SUPPORT */
|
||||||
{
|
{
|
||||||
#error Invalid configUSE_TASK_DPFPU_SUPPORT setting - configUSE_TASK_DPFPU_SUPPORT must be set to 0, 1, 2, or left undefined.
|
#error Invalid configUSE_TASK_DPFPU_SUPPORT setting - configUSE_TASK_DPFPU_SUPPORT must be set to 0, 1, 2, or left undefined.
|
||||||
}
|
}
|
||||||
#endif /* if ( configUSE_TASK_DPFPU_SUPPORT == 1 ) */
|
#endif /* configUSE_TASK_DPFPU_SUPPORT */
|
||||||
|
|
||||||
return pxTopOfStack;
|
return pxTopOfStack;
|
||||||
}
|
}
|
||||||
|
@ -334,6 +329,7 @@ static void prvStartFirstTask( void )
|
||||||
{
|
{
|
||||||
__asm volatile
|
__asm volatile
|
||||||
(
|
(
|
||||||
|
/* *INDENT-OFF* */
|
||||||
|
|
||||||
/* 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.
|
||||||
|
@ -365,7 +361,7 @@ static void prvStartFirstTask( void )
|
||||||
"DPOPM.L DPSW-DECNT \n"\
|
"DPOPM.L DPSW-DECNT \n"\
|
||||||
"DPOPM.D DR0-DR15 \n"\
|
"DPOPM.D DR0-DR15 \n"\
|
||||||
|
|
||||||
#endif /* if ( configUSE_TASK_DPFPU_SUPPORT == 1 ) */
|
#endif /* configUSE_TASK_DPFPU_SUPPORT */
|
||||||
|
|
||||||
"POP R15 \n"\
|
"POP R15 \n"\
|
||||||
|
|
||||||
|
@ -402,7 +398,9 @@ static void prvStartFirstTask( void )
|
||||||
/* This pops the remaining registers. */
|
/* This pops the remaining registers. */
|
||||||
"RTE \n"\
|
"RTE \n"\
|
||||||
"NOP \n"\
|
"NOP \n"\
|
||||||
"NOP \n"
|
"NOP "
|
||||||
|
|
||||||
|
/* *INDENT-ON* */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -411,6 +409,8 @@ void vSoftwareInterruptISR( void )
|
||||||
{
|
{
|
||||||
__asm volatile
|
__asm volatile
|
||||||
(
|
(
|
||||||
|
/* *INDENT-OFF* */
|
||||||
|
|
||||||
/* Re-enable interrupts. */
|
/* Re-enable interrupts. */
|
||||||
"SETPSW I \n"\
|
"SETPSW I \n"\
|
||||||
|
|
||||||
|
@ -481,7 +481,7 @@ void vSoftwareInterruptISR( void )
|
||||||
"DPUSHM.D DR0-DR15 \n"\
|
"DPUSHM.D DR0-DR15 \n"\
|
||||||
"DPUSHM.L DPSW-DECNT \n"\
|
"DPUSHM.L DPSW-DECNT \n"\
|
||||||
|
|
||||||
#endif /* if ( configUSE_TASK_DPFPU_SUPPORT == 1 ) */
|
#endif /* configUSE_TASK_DPFPU_SUPPORT */
|
||||||
|
|
||||||
|
|
||||||
/* Save the stack pointer to the TCB. */
|
/* Save the stack pointer to the TCB. */
|
||||||
|
@ -532,7 +532,7 @@ void vSoftwareInterruptISR( void )
|
||||||
"DPOPM.L DPSW-DECNT \n"\
|
"DPOPM.L DPSW-DECNT \n"\
|
||||||
"DPOPM.D DR0-DR15 \n"\
|
"DPOPM.D DR0-DR15 \n"\
|
||||||
|
|
||||||
#endif /* if( configUSE_TASK_DPFPU_SUPPORT == 1 ) */
|
#endif /* configUSE_TASK_DPFPU_SUPPORT */
|
||||||
|
|
||||||
"POP R15 \n"\
|
"POP R15 \n"\
|
||||||
|
|
||||||
|
@ -565,6 +565,8 @@ void vSoftwareInterruptISR( void )
|
||||||
"NOP \n"\
|
"NOP \n"\
|
||||||
"NOP "
|
"NOP "
|
||||||
::"i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY ), "i" ( configKERNEL_INTERRUPT_PRIORITY )
|
::"i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY ), "i" ( configKERNEL_INTERRUPT_PRIORITY )
|
||||||
|
|
||||||
|
/* *INDENT-ON* */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -591,9 +593,11 @@ uint32_t ulPortGetIPL( void )
|
||||||
{
|
{
|
||||||
__asm volatile
|
__asm volatile
|
||||||
(
|
(
|
||||||
|
/* *INDENT-OFF* */
|
||||||
"MVFC PSW, R1 \n"\
|
"MVFC PSW, R1 \n"\
|
||||||
"SHLR #24, R1 \n"\
|
"SHLR #24, R1 \n"\
|
||||||
"RTS "
|
"RTS "
|
||||||
|
/* *INDENT-ON* */
|
||||||
);
|
);
|
||||||
|
|
||||||
/* This will never get executed, but keeps the compiler from complaining. */
|
/* This will never get executed, but keeps the compiler from complaining. */
|
||||||
|
@ -608,6 +612,7 @@ void vPortSetIPL( uint32_t ulNewIPL )
|
||||||
|
|
||||||
__asm volatile
|
__asm volatile
|
||||||
(
|
(
|
||||||
|
/* *INDENT-OFF* */
|
||||||
"PUSH R5 \n"\
|
"PUSH R5 \n"\
|
||||||
"MVFC PSW, R5 \n"\
|
"MVFC PSW, R5 \n"\
|
||||||
"SHLL #24, R1 \n"\
|
"SHLL #24, R1 \n"\
|
||||||
|
@ -616,6 +621,7 @@ void vPortSetIPL( uint32_t ulNewIPL )
|
||||||
"MVTC R5, PSW \n"\
|
"MVTC R5, PSW \n"\
|
||||||
"POP R5 \n"\
|
"POP R5 \n"\
|
||||||
"RTS "
|
"RTS "
|
||||||
|
/* *INDENT-ON* */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
|
@ -22,16 +22,16 @@
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://github.com/FreeRTOS
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
* 1 tab == 4 spaces!
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef PORTMACRO_H
|
#ifndef PORTMACRO_H
|
||||||
#define PORTMACRO_H
|
#define PORTMACRO_H
|
||||||
|
|
||||||
|
/* *INDENT-OFF* */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
/*-----------------------------------------------------------
|
/*-----------------------------------------------------------
|
||||||
* Port specific definitions.
|
* Port specific definitions.
|
||||||
|
@ -99,6 +99,7 @@
|
||||||
* where portITU_SWINTR is the location of the software interrupt register
|
* where portITU_SWINTR is the location of the software interrupt register
|
||||||
* (0x000872E0). Don't rely on the assembler to select a register, so instead
|
* (0x000872E0). Don't rely on the assembler to select a register, so instead
|
||||||
* save and restore clobbered registers manually. */
|
* save and restore clobbered registers manually. */
|
||||||
|
/* *INDENT-OFF* */
|
||||||
#define portYIELD() \
|
#define portYIELD() \
|
||||||
__asm volatile \
|
__asm volatile \
|
||||||
( \
|
( \
|
||||||
|
@ -106,9 +107,10 @@
|
||||||
"MOV.L #0x872E0, R10 \n"\
|
"MOV.L #0x872E0, R10 \n"\
|
||||||
"MOV.B #0x1, [ R10 ] \n"\
|
"MOV.B #0x1, [ R10 ] \n"\
|
||||||
"CMP [ R10 ].UB, R10 \n"\
|
"CMP [ R10 ].UB, R10 \n"\
|
||||||
"POP R10 \n"\
|
"POP R10 "\
|
||||||
:::"cc" \
|
:::"cc" \
|
||||||
)
|
)
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
#define portYIELD_FROM_ISR( x ) if( ( x ) != pdFALSE ) portYIELD()
|
#define portYIELD_FROM_ISR( x ) if( ( x ) != pdFALSE ) portYIELD()
|
||||||
|
|
||||||
|
@ -170,6 +172,7 @@
|
||||||
#if ( configUSE_TASK_DPFPU_SUPPORT == 1 )
|
#if ( configUSE_TASK_DPFPU_SUPPORT == 1 )
|
||||||
void vPortTaskUsesDPFPU( void );
|
void vPortTaskUsesDPFPU( void );
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/* Each task has a DPFPU context already, so define this function away to
|
/* Each task has a DPFPU context already, so define this function away to
|
||||||
* nothing to prevent it being called accidentally. */
|
* nothing to prevent it being called accidentally. */
|
||||||
#define vPortTaskUsesDPFPU()
|
#define vPortTaskUsesDPFPU()
|
||||||
|
@ -179,8 +182,10 @@
|
||||||
/* Definition to allow compatibility with existing FreeRTOS Demo using flop.c. */
|
/* Definition to allow compatibility with existing FreeRTOS Demo using flop.c. */
|
||||||
#define portTASK_USES_FLOATING_POINT() vPortTaskUsesDPFPU()
|
#define portTASK_USES_FLOATING_POINT() vPortTaskUsesDPFPU()
|
||||||
|
|
||||||
|
/* *INDENT-OFF* */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
#endif /* PORTMACRO_H */
|
#endif /* PORTMACRO_H */
|
||||||
|
|
|
@ -22,14 +22,13 @@
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://github.com/FreeRTOS
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
* 1 tab == 4 spaces!
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*-----------------------------------------------------------
|
/*-----------------------------------------------------------
|
||||||
* Implementation of functions defined in portable.h for the RXv3 DPFPU port.
|
* Implementation of functions defined in portable.h for the RXv3 DPFPU port.
|
||||||
*----------------------------------------------------------*/
|
*----------------------------------------------------------*/
|
||||||
|
|
||||||
#warning Testing for DFPU support in this port is not yet complete
|
#warning Testing for DPFPU support in this port is not yet complete
|
||||||
|
|
||||||
/* Scheduler includes. */
|
/* Scheduler includes. */
|
||||||
#include "FreeRTOS.h"
|
#include "FreeRTOS.h"
|
||||||
|
@ -40,14 +39,10 @@
|
||||||
|
|
||||||
/* Hardware specifics. */
|
/* Hardware specifics. */
|
||||||
#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )
|
#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )
|
||||||
|
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
#else
|
||||||
#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
|
||||||
|
|
||||||
#include "iodefine.h"
|
#include "iodefine.h"
|
||||||
|
#endif
|
||||||
#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -99,7 +94,7 @@ __interrupt void vTickISR( void );
|
||||||
|
|
||||||
StackType_t ulPortTaskHasDPFPUContext = portNO_DPFPU_CONTEXT;
|
StackType_t ulPortTaskHasDPFPUContext = portNO_DPFPU_CONTEXT;
|
||||||
|
|
||||||
#endif /* configUSE_TASK_DPFPU_SUPPORT */
|
#endif
|
||||||
|
|
||||||
/* This is accessed by the inline assembler functions so is file scope for
|
/* This is accessed by the inline assembler functions so is file scope for
|
||||||
* convenience. */
|
* convenience. */
|
||||||
|
@ -244,11 +239,11 @@ StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
|
||||||
{
|
{
|
||||||
/* Omit DPFPU support. */
|
/* Omit DPFPU support. */
|
||||||
}
|
}
|
||||||
#else /* if ( configUSE_TASK_DPFPU_SUPPORT == 1 ) */
|
#else /* configUSE_TASK_DPFPU_SUPPORT */
|
||||||
{
|
{
|
||||||
#error Invalid configUSE_TASK_DPFPU_SUPPORT setting - configUSE_TASK_DPFPU_SUPPORT must be set to 0, 1, 2, or left undefined.
|
#error Invalid configUSE_TASK_DPFPU_SUPPORT setting - configUSE_TASK_DPFPU_SUPPORT must be set to 0, 1, 2, or left undefined.
|
||||||
}
|
}
|
||||||
#endif /* if ( configUSE_TASK_DPFPU_SUPPORT == 1 ) */
|
#endif /* configUSE_TASK_DPFPU_SUPPORT */
|
||||||
|
|
||||||
return pxTopOfStack;
|
return pxTopOfStack;
|
||||||
}
|
}
|
||||||
|
@ -311,6 +306,7 @@ static void prvStartFirstTask( void )
|
||||||
{
|
{
|
||||||
__asm volatile
|
__asm volatile
|
||||||
(
|
(
|
||||||
|
/* *INDENT-OFF* */
|
||||||
|
|
||||||
/* 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.
|
||||||
|
@ -342,7 +338,7 @@ static void prvStartFirstTask( void )
|
||||||
"DPOPM.L DPSW-DECNT \n"\
|
"DPOPM.L DPSW-DECNT \n"\
|
||||||
"DPOPM.D DR0-DR15 \n"\
|
"DPOPM.D DR0-DR15 \n"\
|
||||||
|
|
||||||
#endif /* if ( configUSE_TASK_DPFPU_SUPPORT == 1 ) */
|
#endif /* configUSE_TASK_DPFPU_SUPPORT */
|
||||||
|
|
||||||
"POP R15 \n"\
|
"POP R15 \n"\
|
||||||
|
|
||||||
|
@ -379,7 +375,9 @@ static void prvStartFirstTask( void )
|
||||||
/* This pops the remaining registers. */
|
/* This pops the remaining registers. */
|
||||||
"RTE \n"\
|
"RTE \n"\
|
||||||
"NOP \n"\
|
"NOP \n"\
|
||||||
"NOP \n"
|
"NOP "
|
||||||
|
|
||||||
|
/* *INDENT-ON* */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -389,6 +387,8 @@ __interrupt void vSoftwareInterruptISR( void )
|
||||||
{
|
{
|
||||||
__asm volatile
|
__asm volatile
|
||||||
(
|
(
|
||||||
|
/* *INDENT-OFF* */
|
||||||
|
|
||||||
/* Re-enable interrupts. */
|
/* Re-enable interrupts. */
|
||||||
"SETPSW I \n"\
|
"SETPSW I \n"\
|
||||||
|
|
||||||
|
@ -459,7 +459,7 @@ __interrupt void vSoftwareInterruptISR( void )
|
||||||
"DPUSHM.D DR0-DR15 \n"\
|
"DPUSHM.D DR0-DR15 \n"\
|
||||||
"DPUSHM.L DPSW-DECNT \n"\
|
"DPUSHM.L DPSW-DECNT \n"\
|
||||||
|
|
||||||
#endif /* if ( configUSE_TASK_DPFPU_SUPPORT == 1 ) */
|
#endif /* configUSE_TASK_DPFPU_SUPPORT */
|
||||||
|
|
||||||
|
|
||||||
/* Save the stack pointer to the TCB. */
|
/* Save the stack pointer to the TCB. */
|
||||||
|
@ -510,7 +510,7 @@ __interrupt void vSoftwareInterruptISR( void )
|
||||||
"DPOPM.L DPSW-DECNT \n"\
|
"DPOPM.L DPSW-DECNT \n"\
|
||||||
"DPOPM.D DR0-DR15 \n"\
|
"DPOPM.D DR0-DR15 \n"\
|
||||||
|
|
||||||
#endif /* if( configUSE_TASK_DPFPU_SUPPORT == 1 ) */
|
#endif /* configUSE_TASK_DPFPU_SUPPORT */
|
||||||
|
|
||||||
"POP R15 \n"\
|
"POP R15 \n"\
|
||||||
|
|
||||||
|
@ -543,6 +543,8 @@ __interrupt void vSoftwareInterruptISR( void )
|
||||||
"NOP \n"\
|
"NOP \n"\
|
||||||
"NOP "
|
"NOP "
|
||||||
portCDT_NO_PARSE( :: ) "i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY ), "i" ( configKERNEL_INTERRUPT_PRIORITY )
|
portCDT_NO_PARSE( :: ) "i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY ), "i" ( configKERNEL_INTERRUPT_PRIORITY )
|
||||||
|
|
||||||
|
/* *INDENT-ON* */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
|
@ -22,19 +22,19 @@
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://github.com/FreeRTOS
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
* 1 tab == 4 spaces!
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef PORTMACRO_H
|
#ifndef PORTMACRO_H
|
||||||
#define PORTMACRO_H
|
#define PORTMACRO_H
|
||||||
|
|
||||||
/* Hardware specifics. */
|
/* Hardware specifics. */
|
||||||
#include <intrinsics.h>
|
#include <intrinsics.h>
|
||||||
|
|
||||||
|
/* *INDENT-OFF* */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
/*-----------------------------------------------------------
|
/*-----------------------------------------------------------
|
||||||
* Port specific definitions.
|
* Port specific definitions.
|
||||||
|
@ -102,6 +102,7 @@
|
||||||
* where portITU_SWINTR is the location of the software interrupt register
|
* where portITU_SWINTR is the location of the software interrupt register
|
||||||
* (0x000872E0). Don't rely on the assembler to select a register, so instead
|
* (0x000872E0). Don't rely on the assembler to select a register, so instead
|
||||||
* save and restore clobbered registers manually. */
|
* save and restore clobbered registers manually. */
|
||||||
|
/* *INDENT-OFF* */
|
||||||
#define portYIELD() \
|
#define portYIELD() \
|
||||||
__asm volatile \
|
__asm volatile \
|
||||||
( \
|
( \
|
||||||
|
@ -109,9 +110,10 @@
|
||||||
"MOV.L #0x872E0, R10 \n"\
|
"MOV.L #0x872E0, R10 \n"\
|
||||||
"MOV.B #0x1, [ R10 ] \n"\
|
"MOV.B #0x1, [ R10 ] \n"\
|
||||||
"CMP [ R10 ].UB, R10 \n"\
|
"CMP [ R10 ].UB, R10 \n"\
|
||||||
"POP R10 \n"\
|
"POP R10 "\
|
||||||
portCDT_NO_PARSE( ::: ) "cc"\
|
portCDT_NO_PARSE( ::: ) "cc"\
|
||||||
)
|
)
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
#define portYIELD_FROM_ISR( x ) if( ( x ) != pdFALSE ) portYIELD()
|
#define portYIELD_FROM_ISR( x ) if( ( x ) != pdFALSE ) portYIELD()
|
||||||
|
|
||||||
|
@ -174,6 +176,7 @@
|
||||||
#if ( configUSE_TASK_DPFPU_SUPPORT == 1 )
|
#if ( configUSE_TASK_DPFPU_SUPPORT == 1 )
|
||||||
void vPortTaskUsesDPFPU( void );
|
void vPortTaskUsesDPFPU( void );
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/* Each task has a DPFPU context already, so define this function away to
|
/* Each task has a DPFPU context already, so define this function away to
|
||||||
* nothing to prevent it being called accidentally. */
|
* nothing to prevent it being called accidentally. */
|
||||||
#define vPortTaskUsesDPFPU()
|
#define vPortTaskUsesDPFPU()
|
||||||
|
@ -188,8 +191,10 @@
|
||||||
* the warnings cannot be prevent by code changes without undesirable effects. */
|
* the warnings cannot be prevent by code changes without undesirable effects. */
|
||||||
#pragma diag_suppress=Pa082
|
#pragma diag_suppress=Pa082
|
||||||
|
|
||||||
|
/* *INDENT-OFF* */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
#endif /* PORTMACRO_H */
|
#endif /* PORTMACRO_H */
|
||||||
|
|
|
@ -22,14 +22,13 @@
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://github.com/FreeRTOS
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
* 1 tab == 4 spaces!
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*-----------------------------------------------------------
|
/*-----------------------------------------------------------
|
||||||
* Implementation of functions defined in portable.h for the RXv3 DPFPU port.
|
* Implementation of functions defined in portable.h for the RXv3 DPFPU port.
|
||||||
*----------------------------------------------------------*/
|
*----------------------------------------------------------*/
|
||||||
|
|
||||||
#warning Testing for DFPU support in this port is not yet complete
|
#warning Testing for DPFPU support in this port is not yet complete
|
||||||
|
|
||||||
/* Scheduler includes. */
|
/* Scheduler includes. */
|
||||||
#include "FreeRTOS.h"
|
#include "FreeRTOS.h"
|
||||||
|
@ -40,14 +39,10 @@
|
||||||
|
|
||||||
/* Hardware specifics. */
|
/* Hardware specifics. */
|
||||||
#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )
|
#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )
|
||||||
|
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
#else
|
||||||
#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
|
||||||
|
|
||||||
#include "iodefine.h"
|
#include "iodefine.h"
|
||||||
|
#endif
|
||||||
#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -115,7 +110,7 @@ void vTickISR( void );
|
||||||
|
|
||||||
StackType_t ulPortTaskHasDPFPUContext = portNO_DPFPU_CONTEXT;
|
StackType_t ulPortTaskHasDPFPUContext = portNO_DPFPU_CONTEXT;
|
||||||
|
|
||||||
#endif /* configUSE_TASK_DPFPU_SUPPORT */
|
#endif
|
||||||
|
|
||||||
/* This is accessed by the inline assembler functions so is file scope for
|
/* This is accessed by the inline assembler functions so is file scope for
|
||||||
* convenience. */
|
* convenience. */
|
||||||
|
@ -260,11 +255,11 @@ StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
|
||||||
{
|
{
|
||||||
/* Omit DPFPU support. */
|
/* Omit DPFPU support. */
|
||||||
}
|
}
|
||||||
#else /* if ( configUSE_TASK_DPFPU_SUPPORT == 1 ) */
|
#else /* configUSE_TASK_DPFPU_SUPPORT */
|
||||||
{
|
{
|
||||||
#error Invalid configUSE_TASK_DPFPU_SUPPORT setting - configUSE_TASK_DPFPU_SUPPORT must be set to 0, 1, 2, or left undefined.
|
#error Invalid configUSE_TASK_DPFPU_SUPPORT setting - configUSE_TASK_DPFPU_SUPPORT must be set to 0, 1, 2, or left undefined.
|
||||||
}
|
}
|
||||||
#endif /* if ( configUSE_TASK_DPFPU_SUPPORT == 1 ) */
|
#endif /* configUSE_TASK_DPFPU_SUPPORT */
|
||||||
|
|
||||||
return pxTopOfStack;
|
return pxTopOfStack;
|
||||||
}
|
}
|
||||||
|
@ -330,6 +325,7 @@ void vPortEndScheduler( void )
|
||||||
static void prvStartFirstTask( void )
|
static void prvStartFirstTask( void )
|
||||||
{
|
{
|
||||||
#ifndef __CDT_PARSER__
|
#ifndef __CDT_PARSER__
|
||||||
|
/* *INDENT-OFF* */
|
||||||
|
|
||||||
/* 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.
|
||||||
|
@ -361,7 +357,7 @@ static void prvStartFirstTask( void )
|
||||||
DPOPM.L DPSW-DECNT
|
DPOPM.L DPSW-DECNT
|
||||||
DPOPM.D DR0-DR15
|
DPOPM.D DR0-DR15
|
||||||
|
|
||||||
#endif /* if ( configUSE_TASK_DPFPU_SUPPORT == 1 ) */
|
#endif /* configUSE_TASK_DPFPU_SUPPORT */
|
||||||
|
|
||||||
POP R15
|
POP R15
|
||||||
|
|
||||||
|
@ -400,6 +396,7 @@ static void prvStartFirstTask( void )
|
||||||
NOP
|
NOP
|
||||||
NOP
|
NOP
|
||||||
|
|
||||||
|
/* *INDENT-ON* */
|
||||||
#endif /* ifndef __CDT_PARSER__ */
|
#endif /* ifndef __CDT_PARSER__ */
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -414,6 +411,7 @@ void vSoftwareInterruptISR( void )
|
||||||
static void prvYieldHandler( void )
|
static void prvYieldHandler( void )
|
||||||
{
|
{
|
||||||
#ifndef __CDT_PARSER__
|
#ifndef __CDT_PARSER__
|
||||||
|
/* *INDENT-OFF* */
|
||||||
|
|
||||||
/* Re-enable interrupts. */
|
/* Re-enable interrupts. */
|
||||||
SETPSW I
|
SETPSW I
|
||||||
|
@ -485,7 +483,7 @@ static void prvYieldHandler( void )
|
||||||
DPUSHM.D DR0-DR15
|
DPUSHM.D DR0-DR15
|
||||||
DPUSHM.L DPSW-DECNT
|
DPUSHM.L DPSW-DECNT
|
||||||
|
|
||||||
#endif /* if ( configUSE_TASK_DPFPU_SUPPORT == 1 ) */
|
#endif /* configUSE_TASK_DPFPU_SUPPORT */
|
||||||
|
|
||||||
|
|
||||||
/* Save the stack pointer to the TCB. */
|
/* Save the stack pointer to the TCB. */
|
||||||
|
@ -536,7 +534,7 @@ static void prvYieldHandler( void )
|
||||||
DPOPM.L DPSW-DECNT
|
DPOPM.L DPSW-DECNT
|
||||||
DPOPM.D DR0-DR15
|
DPOPM.D DR0-DR15
|
||||||
|
|
||||||
#endif /* if ( configUSE_TASK_DPFPU_SUPPORT == 1 ) */
|
#endif /* configUSE_TASK_DPFPU_SUPPORT */
|
||||||
|
|
||||||
POP R15
|
POP R15
|
||||||
|
|
||||||
|
@ -569,6 +567,7 @@ static void prvYieldHandler( void )
|
||||||
NOP
|
NOP
|
||||||
NOP
|
NOP
|
||||||
|
|
||||||
|
/* *INDENT-ON* */
|
||||||
#endif /* ifndef __CDT_PARSER__ */
|
#endif /* ifndef __CDT_PARSER__ */
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
; /* *INDENT-OFF* */
|
||||||
; /*
|
; /*
|
||||||
; * FreeRTOS Kernel V10.3.1
|
; * FreeRTOS Kernel V10.3.1
|
||||||
; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
@ -22,8 +23,8 @@
|
||||||
; * https://www.FreeRTOS.org
|
; * https://www.FreeRTOS.org
|
||||||
; * https://github.com/FreeRTOS
|
; * https://github.com/FreeRTOS
|
||||||
; *
|
; *
|
||||||
; * 1 tab == 4 spaces!
|
|
||||||
; */
|
; */
|
||||||
|
|
||||||
.GLB _vSoftwareInterruptISR
|
.GLB _vSoftwareInterruptISR
|
||||||
.GLB _vSoftwareInterruptEntry
|
.GLB _vSoftwareInterruptEntry
|
||||||
|
|
||||||
|
@ -36,6 +37,3 @@ _vSoftwareInterruptEntry:
|
||||||
.RVECTOR 27, _vSoftwareInterruptEntry
|
.RVECTOR 27, _vSoftwareInterruptEntry
|
||||||
|
|
||||||
.END
|
.END
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,16 +22,16 @@
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://github.com/FreeRTOS
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
* 1 tab == 4 spaces!
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef PORTMACRO_H
|
#ifndef PORTMACRO_H
|
||||||
#define PORTMACRO_H
|
#define PORTMACRO_H
|
||||||
|
|
||||||
|
/* *INDENT-OFF* */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
/* Hardware specifics. */
|
/* Hardware specifics. */
|
||||||
#include <machine.h>
|
#include <machine.h>
|
||||||
|
@ -102,6 +102,7 @@
|
||||||
* where portITU_SWINTR is the location of the software interrupt register
|
* where portITU_SWINTR is the location of the software interrupt register
|
||||||
* (0x000872E0). Don't rely on the assembler to select a register, so instead
|
* (0x000872E0). Don't rely on the assembler to select a register, so instead
|
||||||
* save and restore clobbered registers manually. */
|
* save and restore clobbered registers manually. */
|
||||||
|
/* *INDENT-OFF* */
|
||||||
#pragma inline_asm vPortYield
|
#pragma inline_asm vPortYield
|
||||||
static void vPortYield( void )
|
static void vPortYield( void )
|
||||||
{
|
{
|
||||||
|
@ -119,6 +120,7 @@
|
||||||
POP R5
|
POP R5
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
#define portYIELD() vPortYield()
|
#define portYIELD() vPortYield()
|
||||||
#define portYIELD_FROM_ISR( x ) if( ( x ) != pdFALSE ) portYIELD()
|
#define portYIELD_FROM_ISR( x ) if( ( x ) != pdFALSE ) portYIELD()
|
||||||
|
@ -169,6 +171,7 @@
|
||||||
#if ( configUSE_TASK_DPFPU_SUPPORT == 1 )
|
#if ( configUSE_TASK_DPFPU_SUPPORT == 1 )
|
||||||
void vPortTaskUsesDPFPU( void );
|
void vPortTaskUsesDPFPU( void );
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/* Each task has a DPFPU context already, so define this function away to
|
/* Each task has a DPFPU context already, so define this function away to
|
||||||
* nothing to prevent it being called accidentally. */
|
* nothing to prevent it being called accidentally. */
|
||||||
#define vPortTaskUsesDPFPU()
|
#define vPortTaskUsesDPFPU()
|
||||||
|
@ -178,8 +181,10 @@
|
||||||
/* Definition to allow compatibility with existing FreeRTOS Demo using flop.c. */
|
/* Definition to allow compatibility with existing FreeRTOS Demo using flop.c. */
|
||||||
#define portTASK_USES_FLOATING_POINT() vPortTaskUsesDPFPU()
|
#define portTASK_USES_FLOATING_POINT() vPortTaskUsesDPFPU()
|
||||||
|
|
||||||
|
/* *INDENT-OFF* */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
#endif /* PORTMACRO_H */
|
#endif /* PORTMACRO_H */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue