Determine flash size on your module

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
User avatar
c.man
Posts: 21
Joined: Thu Jul 06, 2017 9:12 pm

Re: Determine flash size on your module

Post by c.man » Fri Jul 28, 2017 10:24 am

ok. But Is it possible to use the free space to save information ? (ex. temperature acquisition, time, etc)

User avatar
pythoncoder
Posts: 3496
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Determine flash size on your module

Post by pythoncoder » Sat Jul 29, 2017 10:09 am

You can save data to the filesystem using Python file I/O.
Peter Hinch

User avatar
c.man
Posts: 21
Joined: Thu Jul 06, 2017 9:12 pm

Re: Determine flash size on your module

Post by c.man » Sun Sep 03, 2017 1:22 pm

pfalcon wrote:MicroPython ESP8266 port (in git master) now includes "port_diag" module to query various diagnostic information about port/board for own review or submitting with bug reports. Use it as:

Code: Select all

import port_diag
It will be extended over time.
I tried with port_diag library in ESP32 with last micropython, but don't work. Why ?

User avatar
Roberthh
Posts: 1511
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Determine flash size on your module

Post by Roberthh » Sun Sep 03, 2017 8:00 pm

For both the ESP8266 and ESP32 port, you can use

Code: Select all

import esp
esp.flash_size()
to get the flash_size, which is seen and used by MicroPython. That may be less then the physical flash size, and is shared by both the firmware and the file system.

Post Reply