Page 1 of 1

Executing code from PSRAM

Posted: Tue Nov 21, 2023 5:44 pm
by Gabryx86_64
Is there a way to execute code from PSRAM?

Re: Executing code from PSRAM

Posted: Wed Nov 22, 2023 4:03 am
by ESP_Sprite
On which chip? The original ESP32 can't do this at all, the ESP32-S3 and I believe the S2 can do this but not trivially. Why are you asking?

Re: Executing code from PSRAM

Posted: Wed Nov 22, 2023 6:55 am
by Gabryx86_64
Since i have yet to buy the board and was just finding out if it was right for my project, i was unsure what to buy between a LOLIN32, the S3, and the C3.

Re: Executing code from PSRAM

Posted: Wed Nov 22, 2023 7:46 am
by ESP_Sprite
Well, you could also simply describe what it is that you want to do and why you think you need to execute code from PSRAM, and we can probably help you better.

Re: Executing code from PSRAM

Posted: Wed Nov 22, 2023 8:04 am
by Gabryx86_64
I am making a little project where i need to let the user run some code either from external devices and such. Since PSRAM is probably the best place to avoid any collision with data ram and is generally sufficiently big enough.

Re: Executing code from PSRAM

Posted: Thu Nov 23, 2023 3:13 am
by ESP_Sprite
You are aware that an ESP32 chip generally executes most of its code directly (well, via a cache) from flash? There's generally no need to move it into PSRAM first, unless you have very specific requirements.

Re: Executing code from PSRAM

Posted: Thu Nov 23, 2023 10:39 am
by lbernstone
You may want to look at the UF2 bootloader.
https://learn.adafruit.com/adafruit-met ... bootloader