cnlohr / esp82xx

Useful ESP8266 C Environment
Other
288 stars 107 forks source link

[ realignment for new esp82xx to flash firmware/page.mpfs ] #94

Closed 0xd3d0c3d closed 4 years ago

0xd3d0c3d commented 5 years ago

the old esp82xx code uses 0x00000 and 0x40000 locations, this new esp82xx code on this repo was never adjusted to reflect that difference. the page.mpfs mpfs_start_at location changed as well in this esp82xx code but, it was also never adjusted to reflect that difference in menuinterface.js. if you were to flash page.mpfs via webgui(then refresh), you'd get file not found because it points to location 65536. this isn't possible with 0x00000 and 0x10000 locations being firmware bins. the MFS_PAGE_OFFSET location defined in user.cfg which is really outlined from esp82xx/include/spi_memory_addrs(0x7c000 + 0x3000 + 0x3000) is a misaligned starting address, the issue with that doesn't reveal itself until you flash a page.mpfs > 65536 in filesize via the webgui.. that issue is a pattern of missing chunks of 8192 bytes every 65536 increments which you can flash dump and compare to prove :)

i've explained the reason more in depth here. https://github.com/cnlohr/esp82xx/issues/93

con-f-use commented 5 years ago

Thanks for your efford, awesome. Did you test these changes with both 8285 and 8266 chips?

0xd3d0c3d commented 5 years ago

no, i didn't.. i tested with 8285. this would be odd with 512k models.. it would def be for 1MB+ variants.. i'll test with 8266 though for you to be sure.

cnlohr commented 4 years ago

cruuuuuddddd I never see these things. I wish I could select some things for github to notify me on. @con-f-use is this still pertinent?

con-f-use commented 4 years ago

I still dabble every now and then, though my job mostly satiates my appetite for tinkering these days. I didn't merge this one because I was afraid changing the offsets might break for chips with onboard flash or older SDKs or something, but we can try. I was hoping @0xd3d0c3d would test that and come back to us.