Skip to content
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

PSRAM manual memory management (IDFGH-12832) #13799

Open
nvx opened this issue May 17, 2024 · 1 comment
Open

PSRAM manual memory management (IDFGH-12832) #13799

nvx opened this issue May 17, 2024 · 1 comment
Labels
Status: Opened Issue is new Type: Feature Request Feature request for IDF

Comments

@nvx
Copy link

nvx commented May 17, 2024

Is your feature request related to a problem?

As per https://docs.espressif.com/projects/esp-idf/en/stable/esp32s3/api-guides/external-ram.html#integrate-ram-into-the-esp32-s3-memory-map it is possible to set the PSRAM to get mapped into the address space without adding it to the allocator, but there is no way to find the offset and size of usable space to be able to make use of the PSRAM when this route is taken.

Describe the solution you'd like.

An API in esp_psram to read the base address that the PSRAM has been mapped into as well as the size of the mapping from user code would be perfect.

Describe alternatives you've considered.

It appears in previous versions of the ESP-IDF the PSRAM was mapped to a static offset so it was possible to access it that way, but current versions map it dynamically so this approach no longer works.

Additional context.

It'd be good if the offset and size returned were the same that would normally be passed to the allocator when using PSRAM with the allocator as then it would still enable the use of PSRAM caching of instructions and rodata too.

@nvx nvx added the Type: Feature Request Feature request for IDF label May 17, 2024
@github-actions github-actions bot changed the title PSRAM manual memory management PSRAM manual memory management (IDFGH-12832) May 17, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label May 17, 2024
@eriksl
Copy link

eriksl commented Jun 4, 2024

Just out of curiosity, can't you just allocate all of it using malloc_heap_caps in one go and then manage it yourself? I am doing something similar with RTC FAST memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new Type: Feature Request Feature request for IDF
Projects
None yet
Development

No branches or pull requests

3 participants