MicroPython on ESP32 with SPIRAM support
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: MicroPython on ESP32 with SPIRAM support
did you try one of the pre-built images, like this one:
https://github.com/loboris/MicroPython_ ... sp32_psram
https://github.com/loboris/MicroPython_ ... sp32_psram
Re: MicroPython on ESP32 with SPIRAM support
Awesome! I was looking forward for the I2C slave. Is it also committed to GitHub? I could not find any source to figure out how it works.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: MicroPython on ESP32 with SPIRAM support
That works, thank you. I can connect with miniterm but connecting using rshell is difficult. It only connects if I reset the board then wait a few seconds (but not too long). I had no problems with the hand-built firmware.Roberthh wrote: ↑Thu Feb 15, 2018 11:37 amdid you try one of the pre-built images, like this one:
https://github.com/loboris/MicroPython_ ... sp32_psram
I wonder if there is something amiss with the instructions in the root message (or if I missed something there). I did this:
In menuconfig select → Component config → ESP32-specific → Support for external, SPI-connected RAM
In menuconfig select → Component config → ESP32-specific → SPI RAM config → Make RAM allocatable using heap_caps_malloc
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: MicroPython on ESP32 with SPIRAM support
If you do not set the size in menuconfig you experience that.
I set the size in Micropython --> System settings --> Micropython heap size
to 3400 KB and that works fine.
I set the size in Micropython --> System settings --> Micropython heap size
to 3400 KB and that works fine.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Re: MicroPython on ESP32 with SPIRAM support
As @kevinkk525 mentioned, you have to set the heap size in menuconfig (Micropython --> System settings --> Micropython heap size), the defaul is 512KB if psRAM is used. You can set it up to 3584 KB, it is less than available 4096KB, as WiFi and some other drivers can also use psRAM.
@tuupola
The new I2C module is not yet commited, I had to do some more tests for I2C slave and write the documentation. It is now working quite good and will be commited probably tommorow.
@tuupola
The new I2C module is not yet commited, I had to do some more tests for I2C slave and write the documentation. It is now working quite good and will be commited probably tommorow.
Re: MicroPython on ESP32 with SPIRAM support
It is on Build Wiki.pythoncoder wrote: ↑Thu Feb 15, 2018 10:38 amOne suggestion: why not put the pre-requisites into the otherwise excellent build instructions in the root message?
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: MicroPython on ESP32 with SPIRAM support
The instructions for changing the heap size are not in the build wiki as far as I can tell.loboris wrote: ↑Thu Feb 15, 2018 4:14 pmIt is on Build Wiki.pythoncoder wrote: ↑Thu Feb 15, 2018 10:38 amOne suggestion: why not put the pre-requisites into the otherwise excellent build instructions in the root message?
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Re: MicroPython on ESP32 with SPIRAM support
The Wiki page for all the configuration options will be added son...kevinkk525 wrote: ↑Thu Feb 15, 2018 5:15 pmThe instructions for changing the heap size are not in the build wiki as far as I can tell.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: MicroPython on ESP32 with SPIRAM support
@loboris Thanks for that. A pointer to the build wiki in the root message would help newcomers to your fork and also ensure you only have one doc to maintain.
I'm still foxed as to why I can only access SpiRAM using a pre-built firmware image. Are further config options required to set the heap size?
I'm still foxed as to why I can only access SpiRAM using a pre-built firmware image. Are further config options required to set the heap size?
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.