I flashed a brand new ESP32 Thing Plus with a recent MicroPython firmware binary (from https://micropython.org/download/#esp32). (first erased properly and then flashing with the esptool as described below)
- esptool.py --chip esp32 --port /dev/tty.SLAB_USBtoUART --baud 460800 --before default_reset --after hard_reset erase_flash
- esptool.py --chip esp32 --port /dev/tty.SLAB_USBtoUART --baud 460800 write_flash -z --flash_freq 40m --flash_mode dio --flash_size=16MB 0x1000 esp32-20190529-v1.11.bin
ets_main.c 371" like you can see below at the first few lines:
- ets Jun 8 2016 00:22:57
- rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
- flash read err, 1000
- ets_main.c 371
- ets Jun 8 2016 00:22:57
- rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
- configsip: 0, SPIWP:0xee
- clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
- mode:DIO, clock div:2
- load:0x3fff0018,len:4
- load:0x3fff001c,len:4928
- ho 0 tail 12 room 4
- load:0x40078000,len:9332
- load:0x40080400,len:6216
- entry 0x400806e8
- I (433) cpu_start: Pro cpu up.
- I (433) cpu_start: Application information:
- I (433) cpu_start: Compile time: 07:44:16
- I (435) cpu_start: Compile date: May 29 2019
- I (441) cpu_start: ESP-IDF: v3.3-beta1-268-g5c88c5996
- I (447) cpu_start: Starting app cpu, entry point is 0x4008294c
- I (0) cpu_start: App cpu up.
- I (458) heap_init: Initializing. RAM available for dynamic allocation:
- I (465) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
- I (471) heap_init: At 3FFB9B88 len 00026478 (153 KiB): DRAM
- I (477) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
- I (483) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
- I (490) heap_init: At 40093398 len 0000CC68 (51 KiB): IRAM
- I (496) cpu_start: Pro cpu start user code
- I (67) cpu_start: Starting scheduler on PRO CPU.
- I (0) cpu_start: Starting scheduler on APP CPU.
- MicroPython v1.11 on 2019-05-29; ESP32 module with ESP32
- Type "help()" for more information.
- >>>
When I run the following commands to get the filesystem sizes:
- import os
- fs_stat = os.statvfs('/')
- fs_size = fs_stat[0] * fs_stat[2]
- fs_free = fs_stat[0] * fs_stat[3]
- print("File system size {:,} - Free space {:,}".format(fs_size, fs_free))
- File system size 2,072,576 - Free space 2,068,480
Running:
- import esp
- esp.flash_size()
- 16777216
Any ideas to resolve this flash memory issue?
Or what am I doing wrong?