I thought I would post my findings using the WROVER. I purchased the WROVER since I needed to use both WiFi and BLE. The extra RAM would help with larger JSON calls and in memory models using dynamic memory.
Even after purchasing the WROVER I was still getting memory exceptions. Here’s what I discovered:
The Arduino binaries are compiled with explicit external heap allocation. Standard malloc does not allocate to external RAM. If you’re like me, I tend to do break down my problems into classes. Luckily, all I had to do was define a custom allocator base class and also use it for my dynamic data structures.
If you need some code to do that, google OSVM (open source vehicle monitoring). There’s a great example of a custom allocator for the ESP32 WROVER with SPI RAM.
That takes care of your own code, but what about the BLE library? Well, there’s not much you can do about that until the libraries either 1) use explicit heap allocation for SPI RAM or 2) Recompile the libraries for malloc.
All of that being said, there’s not much work required to use the extra heap. I’m not sure why ESP32 Arduino is not compiled using the malloc option though. For most hobbyists it’s probably the best (and default) option. I hope this helps out anyone using the WROVER dev kit in Arduino.
WROVER SPI RAM Findings
-
- Posts: 47
- Joined: Thu Dec 20, 2018 9:47 am
Re: WROVER SPI RAM Findings
See here.czuvich wrote: I’m not sure why ESP32 Arduino is not compiled using the malloc option though. For most hobbyists it’s probably the best (and default) option.
Re: WROVER SPI RAM Findings
Thanks fivdiAtESP32. Valid points with ISR's.
Who is online
Users browsing this forum: No registered users and 116 guests