PSRAM support status
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: PSRAM support status
Looks like the issue is that some code calls stuff like memcpy() with flash cache disabled. This is somewhat of an issue because for the psram workaround, we use a version that lives in flash instead of ROM, and that can't be called because, well, flash is disabled. Working on a patch to store functions like that in IRAM instead.
Re: PSRAM support status
Is there any progress in solving the SPIRAM+WiFi issue and generally in SPIRAM support integration into main esp-idf branch?
Re: PSRAM support status
The fix for WiFi issue and the new toolchain URLs have both been merged into master, however we are having some issues which prevent us from updating Github master branch. We expect to resolve these issues today or tomorrow.
Re: PSRAM support status
I'm pleased to report that after pulling the latest commits from esp-idf master branch and Espressif toolchain 1.22.0-73-ge28a011-5.2.0 all my PSRAM tests passes without error.
Even the complex application (MicroPython running with heap on SPIRAM) runs without error.
The only feature still missing is the possibility tou use malloc() to allocate also in SPIRAM.
Even the complex application (MicroPython running with heap on SPIRAM) runs without error.
The only feature still missing is the possibility tou use malloc() to allocate also in SPIRAM.
Re: PSRAM support status
Hi,
Is the PSRAM completely integrated into the master branch as of today?
What I mean is that can I expect 4mb RAM for my application to run WIFI, BTLE, PPPoS, AWSIoT?
Regards
Is the PSRAM completely integrated into the master branch as of today?
What I mean is that can I expect 4mb RAM for my application to run WIFI, BTLE, PPPoS, AWSIoT?
Regards
Re: PSRAM support status
malloc() will not allocate from SPIRAM region, but you can use heap_caps_malloc(size, MALLOC_CAP_SPIRAM) to allocate from SPIRAM in your application code. All functions using malloc() will allocate from internal RAM.llewellyn wrote:Hi,
Is the PSRAM completely integrated into the master branch as of today?
What I mean is that can I expect 4mb RAM for my application to run WIFI, BTLE, PPPoS, AWSIoT?
Regards
You have to configure → Component config → ESP32-specific → SPI RAM config → Make RAM allocatable using heap_caps_malloc for heap_caps_malloc to be able to use MALLOC_CAP_SPIRAM option.
I've been testing it for the last 6 days and had no issues so far...
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: PSRAM support status
FWIW, we have the code that allows for malloc() in external RAM almost ready, it should be merged shortly.
Re: PSRAM support status
Thanks for the replies.
Waiting for the merge.
Regards
Waiting for the merge.
Regards
Re: PSRAM support status
Hello,
I have some issues with SPI RAM on ALB-WROVER module.
"SPI RAM config" in menuconfig is set to "Make RAM allocatable using heap_caps_malloc".
But when I try to do "heap_caps_malloc" in my program I get the "Guru Meditation Error of type LoadStoreAlignment".
My pretty simple code is based on standard hello_world example (only with SPI RAM support turned on in menuconfig) + loboris test code.
Source: https://gist.github.com/sintech/7595875 ... rld_main-c
Console output: https://gist.github.com/sintech/7595875 ... ole-output
Perhaps I made some stupid mistake. And it would be great if you give me some advice how to fix it.
Thanks in advance.
P.S. same issue was observed while using malloc (with corresponding option enabled in menuconfig).
I have some issues with SPI RAM on ALB-WROVER module.
"SPI RAM config" in menuconfig is set to "Make RAM allocatable using heap_caps_malloc".
But when I try to do "heap_caps_malloc" in my program I get the "Guru Meditation Error of type LoadStoreAlignment".
My pretty simple code is based on standard hello_world example (only with SPI RAM support turned on in menuconfig) + loboris test code.
Source: https://gist.github.com/sintech/7595875 ... rld_main-c
Console output: https://gist.github.com/sintech/7595875 ... ole-output
Perhaps I made some stupid mistake. And it would be great if you give me some advice how to fix it.
Thanks in advance.
P.S. same issue was observed while using malloc (with corresponding option enabled in menuconfig).
Re: PSRAM support status
If "SPI RAM config" in menuconfig is set to "Make RAM allocatable using heap_caps_malloc" you shouldn't use direct memory access, for that you should use "Integrate RAM into ESP32 memory map" option.
If you comment that part of your code, it will work.
If you configure "Make RAM allocatable using malloc() as well", you can use malloc() and heap_caps_malloc().
And you probably don't want to print the index 2000000 times ()
If you comment that part of your code, it will work.
If you configure "Make RAM allocatable using malloc() as well", you can use malloc() and heap_caps_malloc().
And you probably don't want to print the index 2000000 times (
Code: Select all
printf("i: %d\n",i);
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot], dzungpv, Google [Bot], Majestic-12 [Bot] and 122 guests