← index #12024Issue #2335
Related · high · value 3.533
QUERY · ISSUE

esp8266-12f 4M flash need be supported

openby woodgreatopened 2023-07-16updated 2025-01-22
bug

esp8266-12f 4M flash need be supported . My develop board main MCU is esp8266-12f ,But I checked the download page of our main site ,MicroPython.org ,we just support flash 2M of 8266 board firmware ,So can use add 4M version firmware ? thank you !

CANDIDATE · ISSUE

esp8266: Support up to 16 MB of flash

openby Ratfinkopened 2016-08-21updated 2023-01-01
port-esp8266

The ESP8266 supports up to 16 megabytes of SPI flash (source, page 12). NodeMCU has supported this much flash for about two months now, and I notice that MicroPython does not. I don't know all the nuances of the ESP8266, but from what I understand there are three things that should all encode the same size: the flash chip's ID, the SpiFlashChip structure from the SDK, and the bootloader size ID. They might not all agree about the flash chip's size, so we try to make them all agree in flashbdev.py. It looks like in the similar routine from NodeMCU, they use size IDs 8 and 9 for 8 MB and 16 MB, respectively. Setting these IDs in MicroPython seems to make mpy think that it has only 512 kB of flash, and I'm not sure why. Ignoring the bootloader size ID and only calculating flash size from the flash chip's ID seems to work, but somehow that seems like the wrong thing to do.

Long story short, I want to add support for 8 and 16 MB of flash to MicroPython, but I don't know what the right way to do it is. Any advice would be greatly appreciated.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied