Page 1 of 1

How to put code in the sram but not in the external flash

Posted: Tue Aug 02, 2022 4:04 pm
by yonip94
Hello guys!
My name is Yoni and i am using ESP32 DevKitc MCU, esp.idf, Linux environment.

my main code size is 220KB
esp32 sram is 512KB
i would like to burn all the code on the sram but not in the external flash.

is it possible ?
if so how can i do it?
* may it damage some stuffs because parts of my code contains esp main api functions?
Thanks a lot for everyone,
Yoni

Re: How to put code in the sram but not in the external flash

Posted: Wed Aug 03, 2022 1:22 am
by ESP_Sprite
That does not make much sense, conceptually. SRAM is volatile, so putting your code into SRAM means it's gone after you lose power.

Can I ask what you're trying to accomplish here? As in: what do you think putting your code in SRAM would help you with?

Re: How to put code in the sram but not in the external flash

Posted: Wed Aug 03, 2022 5:54 am
by yonip94
ESP_Sprite, thanks a lot for your interest and your fast reply.

The problem i try to solve is:
While using esp_partition_erase_range function to erase a sector (using core 0), still perform operations in parallel using core 1.

as mentioned in this topic:
viewtopic.php?f=13&t=28892&p=101342#p101342

* i explain there more about what i did according to your advices

Thanks a lot
Yoni