Flashed with wrong size selected

I have flashed a brand new ESP32, although binary was for 16MB, and my board is 8MB. Said it flashed successfully, now seems bricked?

[Mar  4 12:04:21.120] e[0;31mE (53) boot: Failed to verify partition tablee[0m
[Mar  4 12:04:21.124] e[0;31mE (58) boot: load partition table error!e[0m
[Mar  4 12:04:21.138] e[0;32mI (9) boot: ESP-IDF 4.2-r8 2nd stage bootloadere[0m
[Mar  4 12:04:21.138] e[0;32mI (9) boot: compile time 14:30:57e[0m
[Mar  4 12:04:21.144] e[0;32mI (10) boot: chip revision: 1e[0m
[Mar  4 12:04:21.149] e[0;32mI (11) boot_comm: chip revision: 1, min. bootloader chip revision: 0e[0m
[Mar  4 12:04:21.155] e[0;32mI (18) qio_mode: Enabling default flash chip QIOe[0m
[Mar  4 12:04:21.160] e[0;32mI (23) boot.esp32: SPI Speed      : 80MHze[0m
[Mar  4 12:04:21.166] e[0;32mI (28) boot.esp32: SPI Mode       : QIOe[0m
[Mar  4 12:04:21.172] e[0;32mI (32) boot.esp32: SPI Flash Size : 8MBe[0m
[Mar  4 12:04:21.177] e[0;32mI (37) boot: Enabling RNG early entropy source...e[0m
[Mar  4 12:04:21.177] e[0;31mE (42) flash_parts: partition 6 invalid - offset 0x390000 size 0xc00000 exceeds flash chip size 

cannot reflash…

tried a second device, was able to flash the binary, although ETh was incorrectly enabled, so it won’t run. Cannot flash a second time…!! :confused:

[Mar  4 12:50:03.520] mgos_freertos.c:155     VersionJ 0.10.9 (20220304-005757)
[Mar  4 12:50:03.520] mgos_freertos.c:157     Mongoose OS 2.20.0 (20220304-005757/2.20.0-g1885c0f)
[Mar  4 12:50:03.531] mgos_freertos.c:161     CPU: 160 MHz, FreeRTOS 8.2.0, heap: 287092 total, 254920 free
[Mar  4 12:50:03.537] mgos_freertos.c:163     Newlib 3.0.0
[Mar  4 12:50:03.543] esp32_main.c:65         ESP-IDF 4.2-r8
[Mar  4 12:50:03.543] esp32_main.c:68         Boot partition: app_0; flash: 8M
[Mar  4 12:50:03.549] mongoose.c:15766        Mongoose 6.18, LwIP 2.1.3
[Mar  4 12:50:03.554] mongoose.c:4932         mbed TLS 2.16.11-cesanta1
[Mar  4 12:50:03.561] mgos_vfs_dev.c:73       nvs: esp32part ({"label": "nvs"}), size 16384
[Mar  4 12:50:03.567] mgos_vfs_dev.c:73       otadata: esp32part ({"label": "otadata"}), size 8192
[Mar  4 12:50:03.573] mgos_vfs_dev.c:73       fs_0: esp32part ({"label": "fs_0"}), size 262144
[Mar  4 12:50:03.578] mgos_vfs_dev.c:73       fs_1: esp32part ({"label": "fs_1"}), size 262144
[Mar  4 12:50:03.584] mgos_vfs_dev.c:73       data: esp32part ({"label": "data"}), size 409600
[Mar  4 12:50:03.591] mgos_vfs.c:174          /: SPIFFS @ fs_0, opts {"bs":4096,"ps":256,"es":4096}
[Mar  4 12:50:04.092] mgos_vfs.c:347          /: size 233681, used: 142568, free: 91113
[Mar  4 12:50:04.391] e[0;31mE (1493) lan8720: lan8720_init(399): wrong chip IDe[0m
[Mar  4 12:50:04.391] e[0;31mE (1503) esp_eth: esp_eth_driver_install(199): init phy failede[0m
[Mar  4 12:50:04.402] esp32_eth.c:118         Ethernet driver init failed: -1
[Mar  4 12:50:04.410] mgos_deps_init.c:312    ethernet init failed
[Mar  4 12:50:04.410] mgos_freertos.c:184     MGOS init failed: -32
[Mar  4 12:50:04.931] e[0;32mI (9) boot: ESP-IDF 4.2-r8 2nd stage bootloadere[0m
[Mar  4 12:50:04.931] e[0;32mI (9) boot: compile time 00:57:39e[0m
[Mar  4 12:50:04.936] e[0;32mI (9) boot: chip revision: 1e[0m
[Mar  4 12:50:04.941] e[0;32mI (11) boot_comm: chip revision: 1, min. bootloader chip revision: 0e[0m
[Mar  4 12:50:04.947] e[0;32mI (18) qio_mode: Enabling default flash chip QIOe[0m
[Mar  4 12:50:04.958] e[0;32mI (23) boot.esp32: SPI Speed      : 80MHze[0m
[Mar  4 12:50:04.959] e[0;32mI (28) boot.esp32: SPI Mode       : QIOe[0m
[Mar  4 12:50:04.964] e[0;32mI (32) boot.esp32: SPI Flash Size : 8MBe[0m
[Mar  4 12:50:04.964] e[0;32mI (37) boot: Enabling RNG early entropy source...e[0m
[Mar  4 12:50:04.969] e[0;32mI (42) boot: Partition Table:e[0m
[Mar  4 12:50:04.975] e[0;32mI (46) boot: ## Label            Usage          Type ST Offset   Lengthe[0m
[Mar  4 12:50:04.981] e[0;32mI (53) boot:  0 nvs              WiFi data        01 02 00009000 00004000 00000000e[0m
[Mar  4 12:50:04.991] e[0;32mI (61) boot:  1 otadata          OTA data         01 00 0000d000 00002000 00000001e[0m
[Mar  4 12:50:04.997] e[0;32mI (70) boot:  2 app_0            OTA app          00 10 00010000 00180000 00000001e[0m
[Mar  4 12:50:05.008] e[0;32mI (78) boot:  3 fs_0             FS               01 82 00190000 00040000 00000000e[0m
[Mar  4 12:50:05.014] e[0;32mI (86) boot:  4 app_1            OTA app          00 11 001d0000 00180000 00000001e[0m
[Mar  4 12:50:05.025] e[0;32mI (94) boot:  5 fs_1             FS               01 82 00350000 00040000 00000000e[0m
[Mar  4 12:50:05.030] e[0;32mI (103) boot:  6 data             FS               01 82 00390000 00064000 00000000e[0m
[Mar  4 12:50:05.041] e[0;32mI (111) boot: End of partition tablee[0m
[Mar  4 12:50:05.047] e[0;32mI (115) boot: OTA data 0: seq 0x00000001, st 0x10, CRC 0x157a2b85, valid? 1e[0m
[Mar  4 12:50:05.053] e[0;32mI (123) boot: OTA data 1: seq 0x00000000, st 0x00, CRC 0x00000000, valid? 0e[0m
[Mar  4 12:50:05.058] e[0;32mI (131) boot_comm: chip revision: 1, min. application chip revision: 0e[0m
[Mar  4 12:50:05.069] e[0;32mI (138) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x2cf44 (184132) mape[0m
[Mar  4 12:50:05.122] e[0;32mI (200) esp_image: segment 1: paddr=0x0003cf6c vaddr=0x3ffb0000 size=0x030ac ( 12460) loade[0m
[Mar  4 12:50:05.127] e[0;32mI (205) esp_image: segment 2: paddr=0x00040020 vaddr=0x400d0020 size=0xbe600 (779776) mape[0m
[Mar  4 12:50:05.355] e[0;32mI (434) esp_image: segment 3: paddr=0x000fe628 vaddr=0x3ffb30ac size=0x008c4 (  2244) loade[0m
[Mar  4 12:50:05.361] e[0;32mI (435) esp_image: segment 4: paddr=0x000feef4 vaddr=0x40080000 size=0x16aa4 ( 92836) loade[0m
[Mar  4 12:50:05.407] e[0;32mI (486) boot: Loaded app from partition at offset 0x10000e[0m
[Mar  4 12:50:05.412] e[0;32mI (486) boot: Disabling RNG early entropy source...e[0m
[Mar  4 12:50:05.418] e[0;32mI (486) cpu_start: Pro cpu up.e[0m
[Mar  4 12:50:05.418] e[0;32mI (490) cpu_start: Application information:e[0m
[Mar  4 12:50:05.428] e[0;32mI (495) cpu_start: Project name:     VersionJe[0m
[Mar  4 12:50:05.432] e[0;32mI (500) cpu_start: App version:      2.20.0e[0m
[Mar  4 12:50:05.434] e[0;32mI (504) cpu_start: Compile time:     Mar  4 2022 00:57:39e[0m
[Mar  4 12:50:05.440] e[0;32mI (511) cpu_start: ELF file SHA256:  f86b653ccce3da65...e[0m
[Mar  4 12:50:05.445] e[0;32mI (517) cpu_start: ESP-IDF:          4.2-r8e[0m
[Mar  4 12:50:05.451] e[0;32mI (521) cpu_start: Starting app cpu, entry point is 0x400807ace[0m
[Mar  4 12:50:05.465] e[0;32mI (523) cpu_start: App cpu up.e[0m
[Mar  4 12:50:05.466] e[0;32mI (532) heap_init: Initializing. RAM available for dynamic allocation:e[0m
[Mar  4 12:50:05.467] e[0;32mI (539) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAMe[0m
[Mar  4 12:50:05.473] e[0;32mI (545) heap_init: At 3FFBAD18 len 000252E8 (148 KiB): DRAMe[0m
[Mar  4 12:50:05.479] e[0;32mI (551) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAMe[0m
[Mar  4 12:50:05.484] e[0;32mI (557) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAMe[0m
[Mar  4 12:50:05.495] e[0;32mI (564) heap_init: At 40096AA4 len 0000955C (37 KiB): IRAMe[0m
[Mar  4 12:50:05.501] e[0;32mI (570) cpu_start: Pro cpu start user codee[0m
[Mar  4 12:50:05.509] e[0;32mI (588) spi_flash: detected chip: generice[0m
[Mar  4 12:50:05.509] e[0;32mI (588) spi_flash: flash io: dioe[0m
[Mar  4 12:50:05.515] e[0;32mI (588) cpu_start: Starting scheduler on PRO CPU.e[0m
[Mar  4 12:50:05.520] e[0;32mI (0) cpu_start: Starting scheduler on APP CPU.e[0m
[Mar  4 12:50:05.537] 
[Mar  4 12:50:05.537] 

I’ve found that sometimes after a screwed up flash (user error) I have not been able to flash my devices using mos tool.

For some reason I’ve had best success flashing any Arduino program (any sketch that compiles, even empty) then flashing from mos again. Instructions for setting up ESP32 in Arduino.

good luck

Try mos flash --esp-erase-chip.

cool, thx klimbot that was actually something I tried… I’ll try again. I noticed when it did work initially, it fell back to a slower speed, not sure if I can set the speed…

Wasnt able to get mos flash --esp-erase-chip to work

I have a new PCB where I have put the WROOM module on a daughter board with 2.54mm headers, it seems to be struggling with setting it to flash mode, which is just confusing, especially when I’m holding down boot to Gnd

Tried reflowing the cp2102n USB-Serial, seems to have worked… still having issues with auto program… but progress… :slight_smile: