{"action":"created","issue":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/1010","labels_url":"https://api.github.com/repos/esp8266/Arduino/issues/1010/labels{/name}","comments_url":"https://api.github.com/repos/esp8266/Arduino/issues/1010/comments","events_url":"https://api.github.com/repos/esp8266/Arduino/issues/1010/events","html_url":"https://github.com/esp8266/Arduino/issues/1010","id":116608350,"number":1010,"title":"Changing flash size setting causes SDK config corruption and crashes early in SDK initialization","user":{"login":"hallard","id":2471931,"avatar_url":"https://avatars.githubusercontent.com/u/2471931?v=3","gravatar_id":"","url":"https://api.github.com/users/hallard","html_url":"https://github.com/hallard","followers_url":"https://api.github.com/users/hallard/followers","following_url":"https://api.github.com/users/hallard/following{/other_user}","gists_url":"https://api.github.com/users/hallard/gists{/gist_id}","starred_url":"https://api.github.com/users/hallard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hallard/subscriptions","organizations_url":"https://api.github.com/users/hallard/orgs","repos_url":"https://api.github.com/users/hallard/repos","events_url":"https://api.github.com/users/hallard/events{/privacy}","received_events_url":"https://api.github.com/users/hallard/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/esp8266/Arduino/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-11-12T18:17:32Z","updated_at":"2015-11-13T18:59:21Z","closed_at":null,"body":"Hi there,\r\n\r\nI'm knocking my head since 2 days, I've got ESP07 1MB that is working fine (Wifi Web server, bla bla all I need is fine) until I decide to set it as an AP (1st config UI), at this point it came direct to crash.\r\n\r\nSo I tested several things, including creating new test sketch with lot of information and setup to Access point (full demo at the end of this issue). \r\nit show that `WiFi.softAP(ssid,password)` goes direct to a core dump whatever param I pass `WiFi.softAP(ssid)` is the same so `WiFi.softAP(\"Hello\",\"World\")`\r\n\r\nFYI, I do not use SPIFFS, so I don't need it.\r\n\r\nWhat is very Strange is that all is working fine as soon as I do not setup AP. When setup to 1MB 64 SPIFFS (so no AP) OTA is working fine, so I think it's really an 1MB Flash chip on board ;-)\r\n\r\nhere the results I tried :    \r\n\r\n**Setting 512K board (NO OTA possible)**\r\n- set board to **512K No SPIFFS** => My sketch works, test sketch with set AP works\r\n- set board to **512K 64K SPIFFS** => My sketch works, test sketch with set AP works    \r\n\r\n**Setting 1M board**\r\n- set board to **1MB No SPIFFS** => This one I would like to try\r\n- set board to **1MB 64K SPIFFS** => My sketch works, test sketch with **set AP crash**\r\n\r\nI'm suspecting conflict with SDK config/flash config or whatever, I really would like to try with config **1MB No SPIFFS** as a test just to see but we do not have this option.\r\n\r\nYou can see crash results below :+1: \r\n```\r\n========== Flash config start\r\nFlash real id   : 001440C8\r\nFlash real size : 1048576\r\n\r\nFlash ide  size : 1048576\r\nFlash ide speed : 40000000\r\nFlash ide mode  : DIO\r\nFlash Chip conf : Good!\r\n========== Flash config End\r\n========== SDK Saved parameters Start\r\nMode: STA\r\nPHY mode: N\r\nChannel: 1\r\nAP id: 0\r\nStatus: 0\r\nAuto connect: 0\r\nSSID (7): Livebox\r\nPassphrase (18): ******************\r\nBSSID set: 0\r\n========== SDK Saved parameters End\r\nConfiguring access point...\r\n\r\nException (29):\r\nepc1=0x4000e1c3 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000018 depc=0x00000000\r\n\r\nctx: cont \r\nsp: 3fff0830 end: 3fff0be0 offset: 01a0\r\n\r\n>>>stack>>>\r\n3fff09d0:  40223fae 4021744c 00000018 3fff1cc0  \r\n3fff09e0:  00000001 3fff2188 3fff2188 40224194  \r\n3fff09f0:  3fff2188 3fff1cc0 00000000 00000001  \r\n3fff0a00:  3ffee704 3ffee518 223a22fc 00000000  \r\n3fff0a10:  4022f498 00000064 fc34fe1a fffeffff  \r\n3fff0a20:  00000018 0000ffff 00000000 00000001  \r\n3fff0a30:  3fff0a48 40220748 3ffee494 3fff1cc0  \r\n3fff0a40:  fc34fe1a 3fff01b4 00000000 00000000  \r\n3fff0a50:  00000000 00000000 00000000 00000000  \r\n3fff0a60:  00000000 00000000 00000000 00000000  \r\n3fff0a70:  00000000 00000000 4022143f 3fff1cc0  \r\n3fff0a80:  3ffefa1c 3fff1cc0 3fff1cc0 40221487  \r\n3fff0a90:  00000000 3ffee518 3ffe93bc 00000000  \r\n3fff0aa0:  40210271 00000003 00000003 00000000  \r\n3fff0ab0:  40210389 00000003 00000003 00000030  \r\n3fff0ac0:  00000001 402103e2 00000003 00000000  \r\n3fff0ad0:  4020232d 00000001 3ffe8c9d 4020554c  \r\n3fff0ae0:  3fff0c00 0000000a 3ffef9fc 40202377  \r\n3fff0af0:  3ffefa54 00000001 3fff0c0c 4020518d  \r\n3fff0b00:  3ffe8c9c 0000000a 3fff0c0c 40204d95  \r\n3fff0b10:  3fff0c0c 00000001 3ffe8c9d 4020554c  \r\n3fff0b20:  3fff0c0c 0000001a 3ffe8636 3ffef9fc  \r\n3fff0b30:  00000000 00000000 3ffefbc0 00000000  \r\n3fff0b40:  3ffefb08 401011f3 3ffefbc0 3ffefb08  \r\n3fff0b50:  3ffefa1c 3ffef9fc 40204858 3ffefbc0  \r\n3fff0b60:  402010ae 000001f4 000001f4 3ffef9fc  \r\n3fff0b70:  3ffefa1c 3ffefa9c 3fff0c0c 4020222f  \r\n3fff0b80:  00000000 00000000 00000000 00000000  \r\n3fff0b90:  00000000 00000000 00000000 00000000  \r\n3fff0ba0:  00000002 00000000 00000000 00000000  \r\n3fff0bb0:  00000000 00000000 00000000 3ffefbac  \r\n3fff0bc0:  3fffdc20 00000000 3ffefba4 40204896  \r\n3fff0bd0:  00000000 00000000 3ffefbc0 40100114  \r\n<<<stack<<<\r\n\r\n ets Jan  8 2013,rst cause:2, boot mode:(1,6)\r\n```\r\n\r\nHere the full test demo sketch\r\n\r\n```c++\r\n#include <ESP8266WiFi.h>\r\n#include <WiFiClient.h> \r\n#include <ESP8266WebServer.h>\r\n\r\nchar ssid[16] ;\r\nchar password[32];\r\n\r\n#define SERIAL_DEBUG\tSerial1\r\n\r\nESP8266WebServer server(80);\r\n\r\nvoid handleRoot() {\r\n\tserver.send(200, \"text/html\", \"<h1>Hello World!</h1>\");\r\n}\r\n\r\nvoid setup() {\r\n\tdelay(1000);\r\n\tSERIAL_DEBUG.begin(115200);\r\n\r\n\r\n  SERIAL_DEBUG.println(\"========== Flash config start\"); \r\n  uint32_t realSize = ESP.getFlashChipRealSize();\r\n  uint32_t ideSize = ESP.getFlashChipSize();\r\n  FlashMode_t ideMode = ESP.getFlashChipMode();\r\n\r\n  SERIAL_DEBUG.printf(\"Flash real id   : %08X\\n\", ESP.getFlashChipId());\r\n  SERIAL_DEBUG.printf(\"Flash real size : %u\\n\\n\", realSize);\r\n  SERIAL_DEBUG.printf(\"Flash ide  size : %u\\n\", ideSize);\r\n  SERIAL_DEBUG.printf(\"Flash ide speed : %u\\n\", ESP.getFlashChipSpeed());\r\n  SERIAL_DEBUG.printf(\"Flash ide mode  : %s\\n\", (ideMode == FM_QIO ? \"QIO\" : ideMode == FM_QOUT ? \"QOUT\" : ideMode == FM_DIO ? \"DIO\" : ideMode == FM_DOUT ? \"DOUT\" : \"UNKNOWN\"));\r\n  SERIAL_DEBUG.printf(\"Flash Chip conf : %s!\\n\", ideSize==realSize ? \"Good\" : \"**** Wrong ****\");\r\n  SERIAL_DEBUG.println(\"========== Flash config End\"); \r\n\r\n  SERIAL_DEBUG.println(\"========== SDK Saved parameters Start\"); \r\n  WiFi.printDiag(SERIAL_DEBUG);\r\n  SERIAL_DEBUG.println(\"========== SDK Saved parameters End\"); \r\n  strcpy(ssid,\"ESP_Test\");\r\n  strcpy(password,\"allowme\");\r\n\r\n\tSERIAL_DEBUG.println(\"Configuring access point...\");\r\n  SERIAL_DEBUG.flush();\r\n  delay(500);\r\n\tWiFi.softAP(ssid,password);\r\n  SERIAL_DEBUG.print(\"WiFi.softAP() called\");\r\n  SERIAL_DEBUG.flush();\r\n\r\n\tIPAddress myIP = WiFi.softAPIP();\r\n\tSERIAL_DEBUG.print(\"AP IP address: \");\r\n\tSERIAL_DEBUG.println(myIP);\r\n\tserver.on(\"/\", handleRoot);\r\n\tserver.begin();\r\n\tSERIAL_DEBUG.println(\"HTTP server started\");\r\n}\r\n\r\nvoid loop() {\r\n\tserver.handleClient();\r\n}\r\n```\r\n\r\nIf anybody has an idea, I'll take, this is driving me mad !!!\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/comments/156524427","html_url":"https://github.com/esp8266/Arduino/issues/1010#issuecomment-156524427","issue_url":"https://api.github.com/repos/esp8266/Arduino/issues/1010","id":156524427,"user":{"login":"Links2004","id":974709,"avatar_url":"https://avatars.githubusercontent.com/u/974709?v=3","gravatar_id":"","url":"https://api.github.com/users/Links2004","html_url":"https://github.com/Links2004","followers_url":"https://api.github.com/users/Links2004/followers","following_url":"https://api.github.com/users/Links2004/following{/other_user}","gists_url":"https://api.github.com/users/Links2004/gists{/gist_id}","starred_url":"https://api.github.com/users/Links2004/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Links2004/subscriptions","organizations_url":"https://api.github.com/users/Links2004/orgs","repos_url":"https://api.github.com/users/Links2004/repos","events_url":"https://api.github.com/users/Links2004/events{/privacy}","received_events_url":"https://api.github.com/users/Links2004/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T18:59:21Z","updated_at":"2015-11-13T18:59:21Z","body":"this time the serial port is not found, the rest seams to work."}}