From be4dc05b78571acf9db6b1684d7f8cff68a6ae8e Mon Sep 17 00:00:00 2001 From: Soren Ptak Date: Tue, 2 Jan 2024 13:06:59 -0500 Subject: [PATCH] Slight format change --- portable/GCC/ARM_CRx_MPU/port.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/portable/GCC/ARM_CRx_MPU/port.c b/portable/GCC/ARM_CRx_MPU/port.c index 392c1cd31..07cc62a09 100644 --- a/portable/GCC/ARM_CRx_MPU/port.c +++ b/portable/GCC/ARM_CRx_MPU/port.c @@ -222,26 +222,21 @@ PRIVILEGED_DATA volatile uint32_t ulICCEOIR = configEOI_ADDRESS; xMPUSettings->ulContext[ ulContextIndex ] = portNO_CRITICAL_NESTING; /* Ensure that the system call stack is double word aligned. */ - xMPUSettings->xSystemCallStackInfo.pulSystemCallStackPointer = &( - xMPUSettings->xSystemCallStackInfo - .ulSystemCallStackBuffer[ configSYSTEM_CALL_STACK_SIZE - 1 ] + xSYSTEM_CALL_STACK_INFO * xSysCallInfo = &( xMPUSettings->xSystemCallStackInfo ); + xSysCallInfo->pulSystemCallStackPointer = &( + xSysCallInfo->ulSystemCallStackBuffer[ configSYSTEM_CALL_STACK_SIZE - 1U ] ); - xMPUSettings->xSystemCallStackInfo.pulSystemCallStackPointer = - ( uint32_t * ) ( ( uint32_t ) ( xMPUSettings->xSystemCallStackInfo - .pulSystemCallStackPointer ) & + + xSysCallInfo->pulSystemCallStackPointer = + ( uint32_t * ) ( ( uint32_t ) ( xSysCallInfo->pulSystemCallStackPointer ) & ( uint32_t ) ( ~( portBYTE_ALIGNMENT_MASK ) ) ); /* This is not NULL only for the duration of a system call. */ - xMPUSettings->xSystemCallStackInfo.pulTaskStackPointer = NULL; - /* Set the System Call LR to go directly to vPortSystemCallExit */ - xMPUSettings->xSystemCallStackInfo.pulSystemCallLinkRegister = &vPortSystemCallExit; + xSysCallInfo->pulTaskStackPointer = NULL; + + /* Set the System Call LR to go directly to vPortSystemCallExit */ + xSysCallInfo->pulSystemCallLinkRegister = &vPortSystemCallExit; UBaseType_t ulStackIndex; - /* Fill the System Call Stack with known values for debugging. */ - for( ulStackIndex = 0x0; ulStackIndex < configSYSTEM_CALL_STACK_SIZE; ulStackIndex++ ) - { - xMPUSettings->xSystemCallStackInfo - .ulSystemCallStackBuffer[ ulStackIndex ] = 0x575B | ulStackIndex; - } /* Return the address where the context of this task should be restored from*/ return ( &xMPUSettings->ulContext[ ulContextIndex ] );