matteocrippa / matteocrippa/leafminer

ESP32-S3 with 4MB of FLASH cannot run LeafMiner

Open
#29 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
158
Forks
26
PR merge metrics
No merged PRs in 30d

Description

LeafMiner 0.0.13

[Mini module ESP32-S3-Zero](https://www.aliexpress.com/item/1005006508849930.html), it has chip ESP32-S3, USB-C connector, 18 pins, on-board antenna, RGB LED and two buttons.

Device info:

```
$ esptool.py flash_id
esptool.py v4.6.2
Found 1 serial ports
Serial port /dev/ttyACM0
Connecting...
Detecting chip type... ESP32-S3
Chip is ESP32-S3 (revision v0.1)
Features: WiFi, BLE
Crystal is 40MHz
MAC: dc:54:75:01:23:45
Uploading stub...
Running stub...
Stub running...
Manufacturer: 20
Device: 4016
Detected flash size: 4MB
Flash type set in eFuse: quad (4 data lines)
Hard resetting via RTS pin...
```

LeafMiner flashed with these commands:

```
# esptool.py write_flash -e 0 /dev/null # full chip ERASE
esptool.py --baud 115200 write_flash 0x0000 bootloader_esp32-s3.bin
esptool.py --baud 115200 write_flash 0x8000 partitions_esp32-s3.bin
esptool.py --baud 115200 write_flash 0x10000 firmware_esp32-s3.bin
```

Device doesn't mine and I see in console that flash is corrupted:

```
$ miniterm /dev/ttyACM0 115200
...
Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x2b (SPI_FAST_FLASH_BOOT)
Saved PC:0x4037da2c
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x4bc
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a0c
entry 0x403c98d0
E (203) spi_flash: Detected size(4096k) smaller than the size in the binary image header(8192k). Probe failed.

assert failed: do_core_init startup.c:328 (flash_ret == ESP_OK)

Backtrace: 0x4037de1e:0x3fceb180 0x40383201:0x3fceb1a0 0x40389221:0x3fceb1c0 0x42021e62:0x3fceb2f0 0x4037d78f:0x3fceb320 0x403cd86b:0x3fceb350 0x403cdb2a:0x3fceb380 0x403c9925:0x3fceb4b0 0x40045c01:0x3fceb570 0x40043ab6:0x3fceb6f0 0x40034c45:0x3fceb710

ELF file SHA256: 9ed6ec27570d25a3

E (234) esp_core_dump_flash: Core dump flash config is corrupted! CRC=0x7bd5c66f instead of 0x0
...
```

It is strange that 4MB of FLASH is not enough to run LeafMiner. NerdMiner_V2 1.6.3 (M5-StampS3) was running at this device for some time...

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure on the ESP32-S3-Zero using the listed esptool.py commands and inspect bootloader_esp32-s3.bin, partitions_esp32-s3.bin, and firmware_esp32-s3.bin alongside the console's 4MB-versus-8MB error. Trace the firmware startup path that probes flash size; done means determining whether 4MB can be supported or documenting the hardware limitation clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.