Trouble with CMake and flash > 4 MB

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
User avatar
RobH
Posts: 91
Joined: Fri Mar 23, 2018 3:37 pm
Location: Netherlands
Contact:

Re: Trouble with CMake and flash > 4 MB

Post by RobH » Thu Mar 11, 2021 4:08 pm

Looks like I'm heading in the wrong direction (w.r.t. to the subject line).

As I mentioned earlier: my board has 4 MB flash. So I should not look for a solution with more flash memory.

When I load the pre-built GENERIC_SPIRAM firmware from the Micropython site I see (about) 4 MB with esp.flash_size() , 4 MB with gc.mem_free() and 2 MB free space with os.statvfs("//").

Having 8MB SPIRAM on board it seems that I have 4 MB more available. If I'm right I would like to know how to enable those 4 MB SPIRAM!

User avatar
rcolistete
Posts: 352
Joined: Thu Dec 31, 2015 3:12 pm
Location: Brazil
Contact:

Re: Trouble with CMake and flash > 4 MB

Post by rcolistete » Sun Mar 14, 2021 4:26 am

AFAIK, (official) MicroPython doesn't support 8MB of PSRAM in ESP32.
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

User avatar
RobH
Posts: 91
Joined: Fri Mar 23, 2018 3:37 pm
Location: Netherlands
Contact:

Re: Trouble with CMake and flash > 4 MB

Post by RobH » Sun Mar 14, 2021 10:25 am

@rcolistete:
Thanks! It confirms what was already indicated by bertel.
So I'll have to consider the superfluous 4MB PSRAM for future use, if and whenever it might become supported.

jetpax
Posts: 1
Joined: Wed Jan 20, 2021 1:35 am

Re: Trouble with CMake and flash > 4 MB

Post by jetpax » Fri Mar 19, 2021 5:17 pm

For those who had difficulty using Cmake with >4M flash, and ended up here per the original thread title, I found that adding the entire Serial flasher config stanza in my sdkconfig.board worked (after a make clean)

for me that was

Code: Select all

#
# Serial flasher config
#
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHMODE="dio"
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
CONFIG_ESPTOOLPY_FLASHFREQ="80m"
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="16MB"
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
# end of Serial flasher config

Post Reply