mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-12 17:17:44 -04:00
Merge branch 'master' into master
This commit is contained in:
commit
41fbca522f
5 changed files with 18 additions and 8 deletions
|
@ -1,7 +1,9 @@
|
||||||
#ifndef PORTHARDWARE_H
|
#ifndef PORTHARDWARE_H
|
||||||
#define PORTHARDWARE_H
|
#define PORTHARDWARE_H
|
||||||
|
|
||||||
|
#ifndef __IAR_SYSTEMS_ASM__
|
||||||
#include <ioavr.h>
|
#include <ioavr.h>
|
||||||
|
#endif
|
||||||
#include "FreeRTOSConfig.h"
|
#include "FreeRTOSConfig.h"
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
#ifndef PORTHARDWARE_H
|
#ifndef PORTHARDWARE_H
|
||||||
#define PORTHARDWARE_H
|
#define PORTHARDWARE_H
|
||||||
|
|
||||||
|
#ifndef __IAR_SYSTEMS_ASM__
|
||||||
#include <ioavr.h>
|
#include <ioavr.h>
|
||||||
|
#endif
|
||||||
#include "FreeRTOSConfig.h"
|
#include "FreeRTOSConfig.h"
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
7
portable/ThirdParty/GCC/Xtensa_ESP32/port.c
vendored
7
portable/ThirdParty/GCC/Xtensa_ESP32/port.c
vendored
|
@ -176,7 +176,7 @@ void _xt_user_exit( void );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Create interrupt stack frame aligned to 16 byte boundary */
|
/* Create interrupt stack frame aligned to 16 byte boundary */
|
||||||
sp = ( StackType_t * ) ( ( ( UBaseType_t ) ( pxTopOfStack + 1 ) - XT_CP_SIZE - XT_STK_FRMSZ ) & ~0xf );
|
sp = ( StackType_t * ) ( ( ( UBaseType_t ) pxTopOfStack - XT_CP_SIZE - XT_STK_FRMSZ ) & ~0xf );
|
||||||
|
|
||||||
/* Clear the entire frame (do not use memset() because we don't depend on C library) */
|
/* Clear the entire frame (do not use memset() because we don't depend on C library) */
|
||||||
for( tp = sp; tp <= pxTopOfStack; ++tp )
|
for( tp = sp; tp <= pxTopOfStack; ++tp )
|
||||||
|
@ -229,6 +229,7 @@ void _xt_user_exit( void );
|
||||||
* //p = (uint32_t *) xMPUSettings->coproc_area;
|
* //p = (uint32_t *) xMPUSettings->coproc_area;
|
||||||
*/
|
*/
|
||||||
p = ( uint32_t * ) ( ( ( uint32_t ) pxTopOfStack - XT_CP_SIZE ) & ~0xf );
|
p = ( uint32_t * ) ( ( ( uint32_t ) pxTopOfStack - XT_CP_SIZE ) & ~0xf );
|
||||||
|
configASSERT( ( uint32_t ) p >= frame->a1 );
|
||||||
p[ 0 ] = 0;
|
p[ 0 ] = 0;
|
||||||
p[ 1 ] = 0;
|
p[ 1 ] = 0;
|
||||||
p[ 2 ] = ( ( ( uint32_t ) p ) + 12 + XCHAL_TOTAL_SA_ALIGN - 1 ) & -XCHAL_TOTAL_SA_ALIGN;
|
p[ 2 ] = ( ( ( uint32_t ) p ) + 12 + XCHAL_TOTAL_SA_ALIGN - 1 ) & -XCHAL_TOTAL_SA_ALIGN;
|
||||||
|
@ -319,7 +320,9 @@ void vPortYieldOtherCore( BaseType_t coreid )
|
||||||
uint32_t usStackDepth )
|
uint32_t usStackDepth )
|
||||||
{
|
{
|
||||||
#if XCHAL_CP_NUM > 0
|
#if XCHAL_CP_NUM > 0
|
||||||
xMPUSettings->coproc_area = ( StackType_t * ) ( ( ( ( uint32_t ) ( pxBottomOfStack + usStackDepth - 1 ) ) - XT_CP_SIZE ) & ~0xf );
|
xMPUSettings->coproc_area = ( StackType_t * ) ( ( uint32_t ) ( pxBottomOfStack + usStackDepth - 1 ));
|
||||||
|
xMPUSettings->coproc_area = ( StackType_t * ) ( ( ( portPOINTER_SIZE_TYPE ) xMPUSettings->coproc_area ) & ( ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) ) );
|
||||||
|
xMPUSettings->coproc_area = ( StackType_t * ) ( ( ( uint32_t ) xMPUSettings->coproc_area - XT_CP_SIZE ) & ~0xf );
|
||||||
|
|
||||||
|
|
||||||
/* NOTE: we cannot initialize the coprocessor save area here because FreeRTOS is going to
|
/* NOTE: we cannot initialize the coprocessor save area here because FreeRTOS is going to
|
||||||
|
|
|
@ -157,7 +157,7 @@ void _xt_user_exit( void );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Create interrupt stack frame aligned to 16 byte boundary */
|
/* Create interrupt stack frame aligned to 16 byte boundary */
|
||||||
sp = ( StackType_t * ) ( ( ( UBaseType_t ) ( pxTopOfStack + 1 ) - XT_CP_SIZE - XT_STK_FRMSZ ) & ~0xf );
|
sp = ( StackType_t * ) ( ( ( UBaseType_t ) pxTopOfStack - XT_CP_SIZE - XT_STK_FRMSZ ) & ~0xf );
|
||||||
|
|
||||||
/* Clear the entire frame (do not use memset() because we don't depend on C library) */
|
/* Clear the entire frame (do not use memset() because we don't depend on C library) */
|
||||||
for( tp = sp; tp <= pxTopOfStack; ++tp )
|
for( tp = sp; tp <= pxTopOfStack; ++tp )
|
||||||
|
@ -196,6 +196,7 @@ void _xt_user_exit( void );
|
||||||
* //p = (uint32_t *) xMPUSettings->coproc_area;
|
* //p = (uint32_t *) xMPUSettings->coproc_area;
|
||||||
*/
|
*/
|
||||||
p = ( uint32_t * ) ( ( ( uint32_t ) pxTopOfStack - XT_CP_SIZE ) & ~0xf );
|
p = ( uint32_t * ) ( ( ( uint32_t ) pxTopOfStack - XT_CP_SIZE ) & ~0xf );
|
||||||
|
configASSERT( ( uint32_t ) p >= frame->a1 );
|
||||||
p[ 0 ] = 0;
|
p[ 0 ] = 0;
|
||||||
p[ 1 ] = 0;
|
p[ 1 ] = 0;
|
||||||
p[ 2 ] = ( ( ( uint32_t ) p ) + 12 + XCHAL_TOTAL_SA_ALIGN - 1 ) & -XCHAL_TOTAL_SA_ALIGN;
|
p[ 2 ] = ( ( ( uint32_t ) p ) + 12 + XCHAL_TOTAL_SA_ALIGN - 1 ) & -XCHAL_TOTAL_SA_ALIGN;
|
||||||
|
@ -286,7 +287,9 @@ void vPortYieldOtherCore( BaseType_t coreid )
|
||||||
uint32_t usStackDepth )
|
uint32_t usStackDepth )
|
||||||
{
|
{
|
||||||
#if XCHAL_CP_NUM > 0
|
#if XCHAL_CP_NUM > 0
|
||||||
xMPUSettings->coproc_area = ( StackType_t * ) ( ( ( ( uint32_t ) ( pxBottomOfStack + usStackDepth - 1 ) ) - XT_CP_SIZE ) & ~0xf );
|
xMPUSettings->coproc_area = ( StackType_t * ) ( ( uint32_t ) ( pxBottomOfStack + usStackDepth - 1 ));
|
||||||
|
xMPUSettings->coproc_area = ( StackType_t * ) ( ( ( portPOINTER_SIZE_TYPE ) xMPUSettings->coproc_area ) & ( ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) ) );
|
||||||
|
xMPUSettings->coproc_area = ( StackType_t * ) ( ( ( uint32_t ) xMPUSettings->coproc_area - XT_CP_SIZE ) & ~0xf );
|
||||||
|
|
||||||
|
|
||||||
/* NOTE: we cannot initialize the coprocessor save area here because FreeRTOS is going to
|
/* NOTE: we cannot initialize the coprocessor save area here because FreeRTOS is going to
|
||||||
|
|
2
portable/ThirdParty/XCC/Xtensa/port.c
vendored
2
portable/ThirdParty/XCC/Xtensa/port.c
vendored
|
@ -220,7 +220,7 @@ void vPortStoreTaskMPUSettings( xMPU_SETTINGS * xMPUSettings,
|
||||||
#if XCHAL_CP_NUM > 0
|
#if XCHAL_CP_NUM > 0
|
||||||
xMPUSettings->coproc_area = ( StackType_t * ) ( ( uint32_t ) ( pxBottomOfStack + ulStackDepth - 1 ));
|
xMPUSettings->coproc_area = ( StackType_t * ) ( ( uint32_t ) ( pxBottomOfStack + ulStackDepth - 1 ));
|
||||||
xMPUSettings->coproc_area = ( StackType_t * ) ( ( ( portPOINTER_SIZE_TYPE ) xMPUSettings->coproc_area ) & ( ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) ) );
|
xMPUSettings->coproc_area = ( StackType_t * ) ( ( ( portPOINTER_SIZE_TYPE ) xMPUSettings->coproc_area ) & ( ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) ) );
|
||||||
xMPUSettings->coproc_area = ( Stacktype_t * ) ( ( ( uint32_t ) xMPUSettings->coproc_area - XT_CP_SIZE ) & ~0xf );
|
xMPUSettings->coproc_area = ( StackType_t * ) ( ( ( uint32_t ) xMPUSettings->coproc_area - XT_CP_SIZE ) & ~0xf );
|
||||||
|
|
||||||
/* NOTE: we cannot initialize the coprocessor save area here because FreeRTOS is going to
|
/* NOTE: we cannot initialize the coprocessor save area here because FreeRTOS is going to
|
||||||
* clear the stack area after we return. This is done in pxPortInitialiseStack().
|
* clear the stack area after we return. This is done in pxPortInitialiseStack().
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue