mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-06-26 03:08:27 +08:00
Correct alignment of stack top in RISC-V port when configISR_STACK_SIZE_WORDS is defined to a non zero value.
This commit is contained in:
@ -56,7 +56,7 @@ stack that was used by main before the scheduler was started for use as the
|
|||||||
interrupt stack after the scheduler has started. */
|
interrupt stack after the scheduler has started. */
|
||||||
#ifdef configISR_STACK_SIZE_WORDS
|
#ifdef configISR_STACK_SIZE_WORDS
|
||||||
static __attribute__ ((aligned(16))) StackType_t xISRStack[ configISR_STACK_SIZE_WORDS ] = { 0 };
|
static __attribute__ ((aligned(16))) StackType_t xISRStack[ configISR_STACK_SIZE_WORDS ] = { 0 };
|
||||||
const StackType_t xISRStackTop = ( StackType_t ) &( xISRStack[ ( configISR_STACK_SIZE_WORDS & ~portBYTE_ALIGNMENT_MASK ) - 1 ] );
|
const StackType_t xISRStackTop = ( StackType_t ) &( xISRStack[ configISR_STACK_SIZE_WORDS & ~portBYTE_ALIGNMENT_MASK ] );
|
||||||
#else
|
#else
|
||||||
extern const uint32_t __freertos_irq_stack_top[];
|
extern const uint32_t __freertos_irq_stack_top[];
|
||||||
const StackType_t xISRStackTop = ( StackType_t ) __freertos_irq_stack_top;
|
const StackType_t xISRStackTop = ( StackType_t ) __freertos_irq_stack_top;
|
||||||
|
Reference in New Issue
Block a user