Executing code from PSRAM

Gabryx86_64
Posts: 3
Joined: Tue Nov 21, 2023 5:43 pm

Executing code from PSRAM

Postby Gabryx86_64 » Tue Nov 21, 2023 5:44 pm

Is there a way to execute code from PSRAM?

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: Executing code from PSRAM

Postby ESP_Sprite » Wed Nov 22, 2023 4:03 am

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?

Gabryx86_64
Posts: 3
Joined: Tue Nov 21, 2023 5:43 pm

Re: Executing code from PSRAM

Postby Gabryx86_64 » Wed Nov 22, 2023 6:55 am

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.

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: Executing code from PSRAM

Postby ESP_Sprite » Wed Nov 22, 2023 7:46 am

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.

Gabryx86_64
Posts: 3
Joined: Tue Nov 21, 2023 5:43 pm

Re: Executing code from PSRAM

Postby Gabryx86_64 » Wed Nov 22, 2023 8:04 am

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.

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: Executing code from PSRAM

Postby ESP_Sprite » Thu Nov 23, 2023 3:13 am

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.

lbernstone
Posts: 829
Joined: Mon Jul 22, 2019 3:20 pm

Re: Executing code from PSRAM

Postby lbernstone » Thu Nov 23, 2023 10:39 am

You may want to look at the UF2 bootloader.
https://learn.adafruit.com/adafruit-met ... bootloader

Who is online

Users browsing this forum: No registered users and 98 guests