Skip to content

Commit 9cc217e

Browse files
author
dongyongtao
committed
application: increase the stack size for demo_eclic_stress and demo_sstc to avoid stack overflow by rvv push-stack in some corner build occasion
Signed-off-by: dongyongtao <dongyongtao@nucleisys.com>
1 parent 16e884a commit 9cc217e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

application/baremetal/demo_eclic_stress/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,15 @@
197197
#define SMODE_TIMER_TICKS (SOC_TIMER_FREQ / (1000 / (SMODE_TICK_MS)))
198198

199199
/* Create separated interrupt stack M-Mode and S-Mode execution when INTSTACK macro defined */
200-
#define INTERRUPT_STACK_SIZE 10240
200+
#define INTERRUPT_STACK_SIZE 20480
201201
uint8_t mmode_int_stack[INTERRUPT_STACK_SIZE] __attribute__((aligned(16)));
202202
uintptr_t mmode_int_sp = (uintptr_t)(mmode_int_stack + sizeof(mmode_int_stack));
203203

204204
uint8_t smode_int_stack[INTERRUPT_STACK_SIZE] __attribute__((aligned(16)));
205205
uintptr_t smode_int_sp = (uintptr_t)(smode_int_stack + sizeof(smode_int_stack));
206206

207207
/* Create a stack for supervisor mode execution */
208-
#define SMODE_STACK_SIZE 10240
208+
#define SMODE_STACK_SIZE 20480
209209
uint8_t smode_stack[SMODE_STACK_SIZE] __attribute__((aligned(16)));
210210
uintptr_t smode_sp = (uintptr_t)(smode_stack + sizeof(smode_stack));
211211

application/baremetal/demo_sstc/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
// 100ms
3030
#define TIMER_TICKS (SOC_TIMER_FREQ / 10)
3131

32-
// 2048 is enough
33-
#define SMODE_STACK_SIZE 2048
32+
// 4096 is enough
33+
#define SMODE_STACK_SIZE 4096
3434

3535
/* Create a stack for supervisor mode execution */
3636
uint8_t smode_stack[SMODE_STACK_SIZE] __attribute__((aligned(16)));

0 commit comments

Comments
 (0)