Determine flash size on your module
Re: Determine flash size on your module
ok. But Is it possible to use the free space to save information ? (ex. temperature acquisition, time, etc)
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Determine flash size on your module
You can save data to the filesystem using Python file I/O.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Determine flash size on your module
I tried with port_diag library in ESP32 with last micropython, but don't work. Why ?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:
It will be extended over time.Code: Select all
import port_diag
Re: Determine flash size on your module
For both the ESP8266 and ESP32 port, you can use
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.
Code: Select all
import esp
esp.flash_size()
Re: Determine flash size on your module
Hello, MicroPython World!
Sorry to bump such an old thread, but I'd like to share some information that could be helpful to others.
As a complete newbie, I wanted to find out how much flash my modules have to know if I could use MicroPython on them - but I received no manual, specs or any kind of details about the modules, and my research on the web produced conflicting results.
So at first I just used the AT commands to get information directly from the module using a terminal software (Putty on Windows). I connected a USB to TTL cable (3.3V) to the module like this:
Then I connected the cable to PC, opened the terminal software and connected to the board. I pressed: and got:
I still wanted to test the OP method, but I noticed right away that the link to https://code.coreboot.org/svn/flashrom/ ... ashchips.h is currently dead. Yet, I set the board into bootloader mode (adding these connections to the board):
... and run: ... the output directly showed the amount of flash (with no need to consult any other sources):
Sorry to bump such an old thread, but I'd like to share some information that could be helpful to others.
As a complete newbie, I wanted to find out how much flash my modules have to know if I could use MicroPython on them - but I received no manual, specs or any kind of details about the modules, and my research on the web produced conflicting results.
So at first I just used the AT commands to get information directly from the module using a terminal software (Putty on Windows). I connected a USB to TTL cable (3.3V) to the module like this:
Code: Select all
VCC <-> VCC, GND <-> GND, TX <-> RX, RX <-> TX, VCC <-> CH_PD
Code: Select all
AT+RST[ENTER][CTRL+J]
So it seems my board does have 1 MB of flash!ets Jan 8 2013,rst cause:4, boot mode:(3,7)
wdt reset
load 0x40100000, len 1396, room 16
tail 4
chksum 0x89
load 0x3ffe8000, len 776, room 4
tail 4
chksum 0xe8
load 0x3ffe8308, len 540, room 4
tail 8
chksum 0xc0
csum 0xc0
2nd boot version : 1.4(b1)
SPI Speed : 40MHz
SPI Mode : DIO
SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000
rl▒▒rl▒▒
Ai-Thinker Technology Co.,Ltd.
ready
I still wanted to test the OP method, but I noticed right away that the link to https://code.coreboot.org/svn/flashrom/ ... ashchips.h is currently dead. Yet, I set the board into bootloader mode (adding these connections to the board):
Code: Select all
GND <-> GPIO0, VCC <-> GPIO2
Code: Select all
esptool.py --port COM5 flash_id
I hope this helps other newbies like me.Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: ..:..:..:..:..:..
Uploading stub...
Running stub...
Stub running...
Manufacturer: e0
Device: 4014
Detected flash size: 1MB
Hard resetting via RTS pin...