diff --git a/arch/risc-v/src/common/riscv_cpuidlestack.c b/arch/risc-v/src/common/riscv_cpuidlestack.c index 00750d496f..3b2227daf1 100644 --- a/arch/risc-v/src/common/riscv_cpuidlestack.c +++ b/arch/risc-v/src/common/riscv_cpuidlestack.c @@ -83,7 +83,7 @@ static uint8_t aligned_data(16) cpu7_idlestack[CONFIG_IDLETHREAD_STACKSIZE]; * Public Data ****************************************************************************/ -uint8_t *g_cpu_basestack[CONFIG_SMP_NCPUS] = +const uint8_t * const g_cpu_basestack[CONFIG_SMP_NCPUS] = { (uint8_t *)&_ebss, #if CONFIG_SMP_NCPUS > 1 diff --git a/arch/risc-v/src/common/riscv_internal.h b/arch/risc-v/src/common/riscv_internal.h index 160ccb4dd7..e677516039 100644 --- a/arch/risc-v/src/common/riscv_internal.h +++ b/arch/risc-v/src/common/riscv_internal.h @@ -117,7 +117,7 @@ EXTERN uintptr_t g_idle_topstack; /* Address of per-cpu idle stack base */ -EXTERN uint8_t *g_cpu_basestack[CONFIG_SMP_NCPUS]; +EXTERN const uint8_t * const g_cpu_basestack[CONFIG_SMP_NCPUS]; /* Address of the saved user stack pointer */