Reputation: 165
Is there a separate stack for FreeRTOS ISR context ? Is it fixed or configurable ?
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 256 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 512 * 1024 ) )
From my understanding this Stack size is exclusively for general tasks and not for ISRs. Any insights would be helpful.
Adding more details : This is an exclusive FreeRTOS port and not available in the community. The architecture is arm926ej-s (This can support a full fledged linux kernel - MMU support, but there was a need for running RTOS on it).
Upvotes: 2
Views: 1941
Reputation: 2967
ISR Stack size are configured by startup code, in your port. There's two ISR: FIQ and IRQ, each has its own stack.
Here I have searched an ARM9 FreeRTOS Demo for its stacks configuration, follow the result:
FreeRTOS/Demo/ARM9_STR91X_IAR$ grep -sri "FIQ_STACK"
91x_init.s: SECTION FIQ_STACK:DATA:NOROOT(3)
91x_init.s: LDR SP, =SFE(FIQ_STACK)
STR91x_FLASH.icf:define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { };
STR91x_FLASH.icf: block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK,
91x_init_IAR.s:FIQ_Stack DEFINE USR_Stack-8 ; followed by FIQ stack
91x_init_IAR.s:ABT_Stack DEFINE FIQ_Stack-8 ; followed by ABT stack
91x_init_IAR.s: LDR SP, =FIQ_Stack
FreeRTOS/Demo/ARM9_STR91X_IAR$ grep -sri __ICFEDIT_size_fiqstack__
STR91x_FLASH.icf:define symbol __ICFEDIT_size_fiqstack__ = 0x10;
STR91x_FLASH.icf:define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { };
It means that stacks sizes are defined in STR91x_FLASH.icf file, or 91x_init_IAR.s, in the ARM9_STR91X_IAR Demo, accordingly with the compiler/startups you use to build.
Upvotes: 2