To access all of the ESP32’s PSRAM in newer WROVER modules with 8 MB, some special code is needed to bank-switch things around a bit, since at most 4 MB can be mapped into the ESP’s address space at any time.
Is himem/bank-switching supported with the current release of PlatformIO? I’m getting error messages of the form “E (131) esp_himem: Cannot allocate memory for meta info. Not initializing!”.
Ah, it’s been years since I last used the Arduino IDE. Updated. ESP32 installed from git. Build of test sketch works, but I get a failure running esptool (java.io.IOException: Cannot run program "/Users/jcw/Documents/Arduino/hardware/espressif/esp32/tools/esptool": error=13, Permission denied). I can’t seem to solve this quickly - even though this is off topic: could you give me a quick hint where the IDE places its compiled firmware image on MacOS? Then I can upload manually.
In the Arduino IDE settings, activate the verbose building checkmark and recompile, the final linker command should tell you where it placed the binary. You may also try to sudo chown -R jcw:jcw /Users/jcw/Documents/Arduino/*?
Thanks: chown didn’t fixi it, but yeah, forgot all about the verbose setting. Ok, looks like esptool isn’t being started up correctly - anyway, I can now upload.
No dice:
entry 0x400806a8
E (108) spiram: SPI RAM not initialized
E (108) esp_himem: Cannot allocate memory for meta info. Not initializing!
PsramSize 0
E (23) spiram: SPI RAM not initialized
spiram size 4294967295
himem free 0
E (23) spiram: SPI RAM not initialized
himem phys 4291035135
himem reserved 262144
Do I need to enable flags somewhere? I’ll dig a bit.
As for the esptool problem, off-topic and FWIW: the IDE is launching what looks like the directory of the tool, not the tool itself. I’m using github head.
If it’s not able to run properly in the Arduino-IDE distributation of Arduino-ESP32, I think it’s best to open an issue at Issues · espressif/arduino-esp32 · GitHub to let the developers help you, instead of us figuring it out independently and taking longer, and then carrying the fix over to them.