mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-20 01:58:32 -04:00
Ensure the PIC32 interrupt stack is 8 byte aligned for all values of configISR_STACK_SIZE.
This commit is contained in:
parent
96db5a3600
commit
8ca40d80a9
4 changed files with 14 additions and 8 deletions
|
@ -188,11 +188,11 @@ volatile UBaseType_t uxInterruptNesting = 0x01;
|
|||
UBaseType_t uxSavedTaskStackPointer = 0;
|
||||
|
||||
/* The stack used by interrupt service routines that cause a context switch. */
|
||||
StackType_t xISRStack[ configISR_STACK_SIZE ] = { 0 };
|
||||
__attribute__ ((aligned(8))) StackType_t xISRStack[ configISR_STACK_SIZE ] = { 0 };
|
||||
|
||||
/* The top of stack value ensures there is enough space to store 6 registers on
|
||||
the callers stack, as some functions seem to want to do this. */
|
||||
const StackType_t * const xISRStackTop = &( xISRStack[ configISR_STACK_SIZE - 7 ] );
|
||||
const StackType_t * const xISRStackTop = &( xISRStack[ ( configISR_STACK_SIZE & ~portBYTE_ALIGNMENT_MASK ) - 8 ] );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue