Recently, I've got ESP-WROVER-KIT with ESP-WROVER module with 4MB psRAM, and I've tried MicroPython on it.
Some modifications were needed to make it work with external SPIRAM, but finaly I've got it runnig.
It is huge difference between MicroPython running with less than 100KB of free memory and running with 4MB of free memory
The MicroPython task stack size is increased to 32 KB (64 KB or greater should also be possible).
I have also implemented internal Flash FAT file system using esp-idf wear leveling driver, so there is less danger to wear the flash out with frequent writes
Here is an example of running on ESP-WROVER:
Code: Select all
I (1404) cpu_start: PSRAM mode: flash 40m sram 40m
I (1405) cpu_start: PSRAM initialized, cache is in normal (1-core mode.
I (1409) cpu_start: Pro cpu up.
I (1421) cpu_start: Single core mode
I (4046) heap_alloc_caps: SPI SRAM memory test OK
I (4046) heap_alloc_caps: Initializing. RAM available for dynamic allocation:
I (4052) heap_alloc_caps: At 3F800000 len 00400000 (4096 KiB): SPIRAM
I (4074) heap_alloc_caps: At 3FFAE2A0 len 00001D60 (7 KiB): DRAM
I (4094) heap_alloc_caps: At 3FFC1318 len 0001ECE8 (123 KiB): DRAM
I (4115) heap_alloc_caps: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (4137) heap_alloc_caps: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (4158) heap_alloc_caps: At 40093AFC len 0000C504 (49 KiB): IRAM
I (4179) cpu_start: Pro cpu start user code
I (4240) cpu_start: Starting scheduler on PRO CPU.
Allocating uPY heap (4194048 bytes) in SPIRAM using malloc
FlashBdev init: Size=2093056, Blocks=511
Using wear leveling FAT file system
MicroPython v1.9.1-219-g3580284e-dirty on 2017-07-08; ESP32 module with ESP32
Type "help()" for more information.
>>> import os
>>> import micropython
stack: 736 out of 31744
GC: total: 4097984, used: 6064, free: 4091920
No. of 1-blocks: 58, 2-blocks: 12, max blk sz: 264, max free sz: 254991
>>> ll = ['esp32'] * 200000
stack: 736 out of 31744
GC: total: 4097984, used: 807760, free: 3290224
No. of 1-blocks: 65, 2-blocks: 16, max blk sz: 50000, max free sz: 204991
ESP-WROVER module is still hard to get, but it is expected to be available in August/September.
Pycom is also offering the boards and OEM modules with 4MB of psRAM, to be available in August/September.
AnalogLamb is offering ALB32-WROVER module with 8MB Flash and [b]4MB psRAM in ESP-WROOM-32 footprint package. ESP32-WROVER is also available for pre-order.
Available on GitHub.
Visit also ESP32 Forum for more detailes.