micropython / micropython-esp32

Old port of MicroPython to the ESP32 -- new port is at https://github.com/micropython/micropython
MIT License
669 stars 216 forks source link

esp_image: Image length 1062848 doesn't fit in partition length 1048576 #235

Closed Lisa999 closed 6 years ago

Lisa999 commented 6 years ago
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_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:4364
load:0x40078000,len:0
load:0x40078000,len:10992
entry 0x4007a6c4
E (400) esp_image: Image length 1062848 doesn't fit in partition length 1048576
E (400) boot: Factory app partition is not bootable
E (402) boot: No bootable app partitions in the partition table
user code done

Standard ESP32 code + mrsurly's dev_sleep patch to implement machine.RTC. This error did NOT happen on the standard ESP32 branch (but then i have no RTC). I thought the partition table was adjusted to the firmware size?

MrSurly commented 6 years ago

@Lisa999 I think (but I'm not sure) that the newer ESP-IDF actually checks partition length, whereas older ones did not. IIRC, the partition table wasn't updated for MP, we just moved the flash start sector further out.

In the interim, you can edit <ESPIDF>/components/partition_table/partitions_singleapp.csv, and increase the "factory, app" size from 1M to 0x180000.

@dpgeorge I'll get a PR soon to rectify this.

MrSurly commented 6 years ago

@Lisa999 Can you test this PR, please?

https://github.com/micropython/micropython-esp32/pull/236

robert-hh commented 6 years ago

Typo in partitions.csv!

MrSurly commented 6 years ago

Typo in partitions.csv!

Yes, there was. Thanks for the catch @robert-hh. Fixed now.

Lisa999 commented 6 years ago

@MrSurly: It's working! Thanks a lot! uPyEasy is putting a LOT of demands on micropython, i'm aware of it. The upside is that it's running cross-platform, which is a major benefit.

killer-p commented 3 years ago

@Lisa999 I think (but I'm not sure) that the newer ESP-IDF actually checks partition length, whereas older ones did not. IIRC, the partition table wasn't updated for MP, we just moved the flash start sector further out.

In the interim, you can edit <ESPIDF>/components/partition_table/partitions_singleapp.csv, and increase the "factory, app" size from 1M to 0x180000.

@dpgeorge I'll get a PR soon to rectify this. Can I increase the "factory, app" size from 1M to a number that larger than 0x18000?Because I still fail even if I increase it to 0x180000

amolrwagh commented 3 years ago

Thank you very much ...It is working for me

amolrwagh commented 3 years ago

@Lisa999 I think (but I'm not sure) that the newer ESP-IDF actually checks partition length, whereas older ones did not. IIRC, the partition table wasn't updated for MP, we just moved the flash start sector further out.

In the interim, you can edit <ESPIDF>/components/partition_table/partitions_singleapp.csv, and increase the "factory, app" size from 1M to 0x180000.

@dpgeorge I'll get a PR soon to rectify this.

Working for me

ParameswaranAP commented 2 years ago

This works for me issue rectified