-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to modify IRAM memory size. (IDFGH-6201) #7876
Comments
I've tried to modify the ld file and configuration file: components/esp32/ld/esp32.ld File modification, IRAM increase 8K: components/soc/esp32/include/soc/soc.h File modification: DRAM reduced by 8K: The program was compiled, but it could not run normally. |
@zikalino Hello, could you please reply to me when you are free? |
@ShenRen Sorry for the late reply! Just from a quick test, the following changes seemed to work for me:
Remove this area from being allocated as heap:
I was able to compile and run an app which would overflow the IRAM section without these changes. No guarantees that these changes are comprehensive though, there might be other places which needs to be changed that I overlooked. |
Closing this one due to lack of activity, but feel free to reopen if my answer didnt fully solve your issue. |
@ESP-Marius Isn't this worth officially adding to IDF? |
I'll bring it up at our next team meeting and see if this is something we wanna officially support or not. In anycase, I encourage people to add upvotes/comments here, as any decision we make might be changed if we see there is a big demand for. |
Please do. Today I have been porting an application from v4.4.2 to the v5.0.0-beta to take advantage of the SDMMC improvements, TRIM support, and ESP32-S3 support and found that I can no longer build for our existing ESP32-based product without disabling vital IRAM optimizations for WiFi. The penalty for disabling these IRAM optimizations is reduction in WiFi throughput by more than 50%. At this time, my team would prefer to increase IRAM for real-time task optimizations and use our PSRAM for non-real-time tasks. |
This would be incredibly useful, I'm already riding 100% iram usage right now and only 58% dram, with still some options I'd love to enable still if only I could reliably increase it. |
Added a kconfig option for this in 5cbd311. |
would the same be possible for the RTC_SLOW_MEMORY data segement? |
Why do not add a SLIDER to choose from DRAM to IRAM and match the size needed ? as it is quite simple to adjust in the memory layout, is no the best to do? |
Hi @ESP-Marius I still cannot see this option in MenuConfig: CONFIG_ESP_SYSTEM_ESP32_SRAM1_REGION_AS_IRAM. My ESP-IDF version is 6.4, and I'm using the PlatformIO environment. [env] |
My program doesn't use DRAM very much, but it has speed and performance requirements, so I need to put some data and functions into IRAM, and the result is IRAM overbound.
According to the official data manual, ESP32 DRAM and IRAM share one SRAM1, which is assigned to DRAM by default.
ESP32 Programmers’ Memory Model
So I want to find a way to give SRAM1 to IRAM. No matter how troublesome it is, please tell me how to do it. I have tried to find several relevant blogs and articles and followed the steps provided. Although the program was compiled, it could not run normally.
Reference :
The text was updated successfully, but these errors were encountered: