ESP8266 Webserver Project

Moderator: Sprite_tm

User avatar
By Avoncliff
#64020 Any updates to this?
I am using a 32Mbit flash on a 12E, and making good progress on my pwm led control.
But I can not get ota to work. Can I use 1024 flash size builds on this 4096 flash? So far I could not get that to work but not sure about the rest of the configuration.
I have just used esptool.py to reflash
boot_v1.6 to 0x0000,
blank to 0xfe000 & 0x3fe000,
esp_init_data_default to 0x3fc000 and the
SDK 1024+1024/user1.2048.new.5.bin to 0x1000,
and it refused to boot with error magic! jump to run user2@81000. So I loaded the user2.2048.5.bin to 81000 and it boots up and directly connects to my wifi.
So where is it storing the wifi password and the option to use user2?
User avatar
By davydnorris
#65493 There's actually a bug in the Makefile on line 166

Flash mode 6 is actually 4096K (1024+1024), and is being built that way, but as you can see in the printouts above it's being flashed as mode 4, which is (512+512).

Change the following line:
Code: Select allESPTOOL_SIZE=$(call maplookup,$(ESP_SPI_FLASH_SIZE_K),512:4m 256:2m 1024:8m 2048:16m 4096:32m)

to
Code: Select allESPTOOL_SIZE=$(call maplookup,$(ESP_SPI_FLASH_SIZE_K),512:4m 256:2m 1024:8m 2048:16m 4096:32m-c1)
User avatar
By Avoncliff
#71968 Well I thought it was working......
Upgrading user1 over the air runs as expected and the reboot comes back up fine.
Doing the same thing when it asks for user2 fails, and looking at the serial output I can see
[22:20:42:801] Firmware upload cgi start.␍␊
[22:20:42:801] size = 96mem addr = 1073681384, size = 96DataLen=1024␍␊
[22:20:51:179] ␍␊
[22:20:51:179] ets Jan 8 2013,rst cause:4, boot mode:(3,6)␍␊
[22:20:51:194] ␍␊
[22:20:51:194] wdt reset␍␊

But when I start looking at what is running I get confused, it looks like it is reading the same address for the web pages from both user1 and user2. I have added a print address to user_init
Code: Select all    os_printf("Web page address %d \n",(int)webpages_espfs_start);
    os_printf("UserInit address %d \n",(int)user_init);

And that prints out the same values of both for user1 or user2,
[22:20:51:416] StartWeb page address 1076056124 ␍␊
[22:20:51:416] UserInit address 1074800192 ␍␊

This is based on the boot messages on the serial port that say jump to user2 @101000 or jump to user1 @1000
Is anyone using OTA updates on 32meg flash, and getting both updates to work correctly?