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

yonip94
Posts: 15
Joined: Mon Jul 11, 2022 12:42 pm

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

Postby yonip94 » Tue Aug 02, 2022 4:04 pm

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

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

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

Postby ESP_Sprite » Wed Aug 03, 2022 1:22 am

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?

yonip94
Posts: 15
Joined: Mon Jul 11, 2022 12:42 pm

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

Postby yonip94 » Wed Aug 03, 2022 5:54 am

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

Who is online

Users browsing this forum: No registered users and 103 guests