Update ARM CM3 MPU port.c

Revert casting of ( uint32_t ) pxBottomOfStack
This commit is contained in:
Phillip Stevens 2024-01-20 16:11:42 +11:00 committed by GitHub
parent 8f16862f7a
commit 595e1abe9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1315,7 +1315,7 @@ void vPortStoreTaskMPUSettings( xMPU_SETTINGS * xMPUSettings,
( portMPU_REGION_CACHEABLE_BUFFERABLE ) |
( portMPU_REGION_ENABLE );
xMPUSettings->xRegionSettings[ 0 ].ulRegionStartAddress = ( uint32_t ) pxBottomOfStack;
xMPUSettings->xRegionSettings[ 0 ].ulRegionEndAddress = ( uint32_t ) ( ( configSTACK_DEPTH_TYPE ) ( pxBottomOfStack ) +
xMPUSettings->xRegionSettings[ 0 ].ulRegionEndAddress = ( uint32_t ) ( ( uint32_t ) ( pxBottomOfStack ) +
( uxStackDepth * ( configSTACK_DEPTH_TYPE ) sizeof( StackType_t ) ) - 1UL );
xMPUSettings->xRegionSettings[ 0 ].ulRegionPermissions = ( tskMPU_READ_PERMISSION |
tskMPU_WRITE_PERMISSION );