ESP8266 Webserver Project

Moderator: Sprite_tm

User avatar
By eivanevi
#83578 Hi guys,

First of all I would like to thank everyone involved with esphttpd project. It's a great project and I learned a lot from it.

I have created my own application based on esphttpd and I compile it against NONOS SDK v2.2.0
I am also using the SDK's latest default.bin and bootloader.bin.
My application has just slightly more web-pages than original esphttpd
In makefile, I choose separate mode, and application works perfectly.

However, when I build project as a OTA, some problems arise:
(I am putting user1.bin to 0x01000 and user2bin to 0x81000.)
(I am using 32mbit ESP board)
(I am compiling with ESP_FLASH_SIZE=1024)

1) Code compiles and gets executed but webpages are not displayed. reported error is "Magic Mismatch. EspFs image is broken" and 404 not found is displayed in the browser.

I've then decided to take a look into makefile and found that when i change this line:
Code: Select allldscript_memspecific.ld:
   $(vecho) "GEN $@"
   $(Q) echo "MEMORY { irom0_0_seg : org = 0x40240000, len = "$$(printf "0x%X" $$(($(ESP_SPI_FLASH_SIZE_K)*1024-0x4000)))" }"> ldscript_memspecific.ld


to something like this:

Code: Select allldscript_memspecific.ld:
   $(vecho) "GEN $@"
   $(Q) echo "MEMORY { irom0_0_seg : org = 0x40240000, len = 0x6B000 }"> ldscript_memspecific.ld


Suddenly if user2.bin is flashed. The code works and pages are displayed correctly.
However if I flash only user1.bin, the webpages are again not displayed, but code is working.

What is happening here? Can somebody experienced please help. I've lost 3 days and have no more clues what can i try. I only have elementary knowledge on makefiles, and can't do much without further help.

Thank you very much for any help