Can i use the external RAM as the stack for the task?
Posted: Mon Feb 12, 2018 8:19 am
by zhoupeng
Opening multiple tasks is a lack of space. I try to use external RAM as an extension, but see
“
//Because the ROM routines don't necessarily handle a stack in external RAM correctly, we force
//the stack memory to always be internal.
”
if there is an unpredictable error in the annotation.
Re: Can i use the external RAM as the stack for the task?
Posted: Tue Feb 13, 2018 4:20 am
by ESP_Sprite
Moved news -> SDK
The annotation is right: we have disabled putting stack in PSRAM because in the current ESP32 chip, it can lead to very subtle, very hard to replicate errors that don't necessarily show up as being a result of the task using PSRAM as stack. If you really, really, *really* have a task with a stack you want to put in external RAM, you're 102% sure it does not call ROM functions anywhere and will never run when PSRAM is not available, you can actually disable the stack-in-psram check for xTaskCreateStatic-ish functions somewhere in menuconfig and then use that to give your task psram memory as stack. Still, this comes with absolutely no guarantee wrt weird crashes from our (Espressifs) side.