Heltec-Aaron-Lee / WiFi_Kit_series

Arduino source codes and toolchain for WiFi_Kit_series made by HelTecAutomation.
GNU Lesser General Public License v2.1
766 stars 308 forks source link

Wifi_Lora_32 (v1) not working with latest 0.0.7 (flash_size 4M vs. 8M) #158

Open chris-est opened 1 year ago

chris-est commented 1 year ago

Hi, i installed v0.0.7 using Arduino Library Manager and tried to flash to a "Wifi_Lora_32" (hardware version v1 with 32MBit =4MByte Flash Chip). Flashing works but the program does not run, i get this in the Serial Monitor:

22:30:23.149 -> ELF file SHA256: 0000000000000000
22:30:23.149 -> 
22:30:23.149 -> Rebooting...
22:30:23.149 -> ets Jun  8 2016 00:22:57
22:30:23.149 -> 
22:30:23.149 -> rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
22:30:23.149 -> configsip: 0, SPIWP:0xee
22:30:23.149 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
22:30:23.149 -> mode:DIO, clock div:1
22:30:23.149 -> load:0x3fff0030,len:1344
22:30:23.149 -> load:0x40078000,len:13864
22:30:23.149 -> load:0x40080400,len:3608
22:30:23.149 -> entry 0x400805f0
22:30:23.249 -> E (124) spi_flash: Detected size(4096k) smaller than the size in the binary image header(8192k). Probe failed.
22:30:23.282 -> 
22:30:23.282 -> assert failed: do_core_init startup.c:298 (flash_ret == ESP_OK)
22:30:23.282 -> 
22:30:23.282 -> 
22:30:23.282 -> Backtrace:0x400837b9:0x3ffe3aa00x400881b1:0x3ffe3ac0 0x4008d075:0x3ffe3ae0 0x400dc522:0x3ffe3c10 0x40082ed5:0x3ffe3c40 0x400792ca:0x3ffe3c90  |<-CORRUPTED

The flash_size is set to 8MB in boards.txt but the board only has 4MB, this and other settings for "wifi_lora_32.build.*" where changed before the v0.0.7 release. Should the latest version be compatible with the v1 hardware?

Workaround I

Switching back to v0.0.6 works

Workaround II

Change boards.txt in v0.0.7:

wifi_lora_32.build.flash_size=4MB
wifi_lora_32.build.partitions=default