{"action":"created","issue":{"url":"https://api.github.com/repos/espressif/esp-idf/issues/2561","repository_url":"https://api.github.com/repos/espressif/esp-idf","labels_url":"https://api.github.com/repos/espressif/esp-idf/issues/2561/labels{/name}","comments_url":"https://api.github.com/repos/espressif/esp-idf/issues/2561/comments","events_url":"https://api.github.com/repos/espressif/esp-idf/issues/2561/events","html_url":"https://github.com/espressif/esp-idf/issues/2561","id":369888712,"node_id":"MDU6SXNzdWUzNjk4ODg3MTI=","number":2561,"title":"[TW#26739] No boot error with: memory_layout: SOC_RESERVE_MEMORY_REGION region range 0xfffffffc - 0x00000000 overlaps with 0xffffffff - 0xffffffff","user":{"login":"X-Ryl669","id":3277165,"node_id":"MDQ6VXNlcjMyNzcxNjU=","avatar_url":"https://avatars2.githubusercontent.com/u/3277165?v=4","gravatar_id":"","url":"https://api.github.com/users/X-Ryl669","html_url":"https://github.com/X-Ryl669","followers_url":"https://api.github.com/users/X-Ryl669/followers","following_url":"https://api.github.com/users/X-Ryl669/following{/other_user}","gists_url":"https://api.github.com/users/X-Ryl669/gists{/gist_id}","starred_url":"https://api.github.com/users/X-Ryl669/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/X-Ryl669/subscriptions","organizations_url":"https://api.github.com/users/X-Ryl669/orgs","repos_url":"https://api.github.com/users/X-Ryl669/repos","events_url":"https://api.github.com/users/X-Ryl669/events{/privacy}","received_events_url":"https://api.github.com/users/X-Ryl669/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-10-14T10:30:02Z","updated_at":"2018-12-04T08:57:18Z","closed_at":null,"author_association":"NONE","body":"## Environment\r\n\r\n- Development Kit:      [ESP32-Wrover-Kit]\r\n- Kit version (for WroverKit/PicoKit/DevKitC): [?]\r\n- Core (if using chip or module): []\r\n- IDF version (``git rev-parse --short HEAD`` to get the commit id.): \r\n    9ca30f6\r\n- Development Env:\t\t[Make]\r\n- Operating System:\t\t[MacOS]\r\n- Power Supply:         [USB]\r\n\r\n## Problem Description\r\n\r\nSuddenly, my app does not boot anymore. I've reverted my changes and it still does not boot up.\r\nI get this output:\r\n```\r\nI (186) boot: ESP-IDF v3.2-dev-915-g6f58208 2nd stage bootloader\r\nI (187) boot: compile time 07:12:15\r\nI (187) boot: Enabling RNG early entropy source...\r\nI (207) boot: SPI Speed      : 40MHz\r\nI (220) boot: SPI Mode       : DIO\r\nI (233) boot: SPI Flash Size : 4MB\r\nI (246) boot: Partition Table:\r\nI (257) boot: ## Label            Usage          Type ST Offset   Length\r\nI (279) boot:  0 nvs              WiFi data        01 02 00009000 00004000\r\nI (303) boot:  1 otadata          OTA data         01 00 0000d000 00002000\r\nI (326) boot:  2 phy_init         RF data          01 01 0000f000 00001000\r\nI (349) boot:  3 factory          factory app      00 00 00010000 000f0000\r\nI (372) boot:  4 ota_0            OTA app          00 10 00100000 00100000\r\nI (396) boot:  5 ota_1            OTA app          00 11 00200000 00100000\r\nI (419) boot:  6 storage          Unknown data     01 82 00300000 00100000\r\nI (443) boot: End of partition table\r\nI (456) boot: Defaulting to factory image\r\nI (470) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1fffc (131068) map\r\nI (773) esp_image: segment 1: paddr=0x00030024 vaddr=0x3ffbdb60 size=0x031ac ( 12716) load\r\nI (803) esp_image: segment 2: paddr=0x000331d8 vaddr=0x3ffc0d0c size=0x00000 (     0) load\r\nI (805) esp_image: segment 3: paddr=0x000331e0 vaddr=0x40080000 size=0x00400 (  1024) load\r\n0x40080000: _WindowOverflow4 at /Users/cyril/esp/esp-idf/components/freertos/xtensa_vectors.S:1685\r\n\r\nI (831) esp_image: segment 4: paddr=0x000335e8 vaddr=0x40080400 size=0x0ca28 ( 51752) load\r\nI (981) esp_image: segment 5: paddr=0x00040018 vaddr=0x400d0018 size=0x82868 (534632) map\r\n0x400d0018: _stext at ??:?\r\n\r\nI (2103) esp_image: segment 6: paddr=0x000c2888 vaddr=0x4008ce28 size=0x02e00 ( 11776) load\r\n0x4008ce28: vPortYield at /Users/cyril/esp/esp-idf/components/freertos/portasm.S:528\r\n\r\nI (2133) esp_image: segment 7: paddr=0x000c5690 vaddr=0x400c0000 size=0x00000 (     0) load\r\nI (2135) esp_image: segment 8: paddr=0x000c5698 vaddr=0x50000200 size=0x00000 (     0) load\r\nI (2217) boot: Loaded app from partition at offset 0x10000\r\nI (2217) boot: Disabling RNG early entropy source...\r\nI (2221) cpu_start: Pro cpu up.\r\nI (2230) cpu_start: Starting app cpu, entry point is 0x40081028\r\n0x40081028: call_start_cpu1 at /Users/cyril/esp/esp-idf/components/esp32/cpu_start.c:228\r\n\r\nI (1) cpu_start: App cpu up.\r\nE (2263) memory_layout: SOC_RESERVE_MEMORY_REGION region range 0xfffffffc - 0x00000000 overlaps with 0xffffffff - 0xffffffff\r\nabort() was called at PC 0x401157cb on core 0\r\n0x401157cb: s_prepare_reserved_regions at /Users/cyril/esp/esp-idf/components/soc/src/memory_layout_utils.c:97\r\n (inlined by) soc_get_available_memory_regions at /Users/cyril/esp/esp-idf/components/soc/src/memory_layout_utils.c:114\r\n\r\n\r\nBacktrace: 0x4008db47:0x3ffe3550 0x4008ddb9:0x3ffe3570 0x401157cb:0x3ffe3590 0x400d2b11:0x3ffe38e0 0x40081192:0x3ffe3c60 0x400790f5:0x3ffe3c80 0x400794c9:0x3ffe3cc0 0x400807e6:0x3ffe3df0 0x40007c31:0x3ffe3eb0 0x4000073d:0x3ffe3f20\r\n0x4008db47: invoke_abort at /Users/cyril/esp/esp-idf/components/esp32/panic.c:660\r\n\r\n0x4008ddb9: abort at /Users/cyril/esp/esp-idf/components/esp32/panic.c:660\r\n\r\n0x401157cb: s_prepare_reserved_regions at /Users/cyril/esp/esp-idf/components/soc/src/memory_layout_utils.c:97\r\n (inlined by) soc_get_available_memory_regions at /Users/cyril/esp/esp-idf/components/soc/src/memory_layout_utils.c:114\r\n\r\n0x400d2b11: heap_caps_init at /Users/cyril/esp/esp-idf/components/heap/heap_caps_init.c:65\r\n\r\n0x40081192: call_start_cpu0 at /Users/cyril/esp/esp-idf/components/esp32/cpu_start.c:213\r\n```\r\nLooking at the code, I'm seeing this:\r\n```\r\nif (reserved[i].end > reserved[i+1].start) {\r\n                ESP_EARLY_LOGE(TAG, \"SOC_RESERVE_MEMORY_REGION region range \" \\\r\n                               \"0x%08x - 0x%08x overlaps with 0x%08x - 0x%08x\",\r\n                               reserved[i].start, reserved[i].end, reserved[i+1].start,\r\n                               reserved[i+1].end);\r\n                abort();\r\n}\r\n```\r\nSince both `reserved[i].end` and `start` are `int_ptr`, the test above fails while end is 0 and (start is `0xFF....` thus negative).\r\n\r\n\r\nThe system does not boot. \r\nPlease notice that the application size fits the partition (partition is 900kB or so, while the app is 740kB), and `make size` returns:\r\n```\r\nTotal sizes:\r\n DRAM .data size:   12716 bytes\r\n DRAM .bss  size:   94848 bytes\r\nUsed static DRAM:  107564 bytes (  17016 available, 86.3% used)\r\nUsed static IRAM:   64552 bytes (  66520 available, 49.2% used)\r\n      Flash code:  534630 bytes\r\n    Flash rodata:  131068 bytes\r\nTotal image size:~ 742966 bytes (.bin may be padded larger)\r\n``` \r\n\r\n\r\n### Expected Behavior\r\nThe application should start\r\n\r\n### Actual Behavior\r\nIt does not (the CPU 0 does not start)\r\n\r\n### Steps to repropduce\r\nI've no idea why this appeared suddenly. I've reverted my changes, make clean and make, yet it's still there (while it worked perfectly before).\r\n\r\n\r\n\r\n## Other items if possible\r\n\r\n- [sdkconfig.txt](https://github.com/espressif/esp-idf/files/2476270/sdkconfig.txt)\r\n"},"comment":{"url":"https://api.github.com/repos/espressif/esp-idf/issues/comments/444021668","html_url":"https://github.com/espressif/esp-idf/issues/2561#issuecomment-444021668","issue_url":"https://api.github.com/repos/espressif/esp-idf/issues/2561","id":444021668,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDAyMTY2OA==","user":{"login":"neoniousTR","id":39573524,"node_id":"MDQ6VXNlcjM5NTczNTI0","avatar_url":"https://avatars3.githubusercontent.com/u/39573524?v=4","gravatar_id":"","url":"https://api.github.com/users/neoniousTR","html_url":"https://github.com/neoniousTR","followers_url":"https://api.github.com/users/neoniousTR/followers","following_url":"https://api.github.com/users/neoniousTR/following{/other_user}","gists_url":"https://api.github.com/users/neoniousTR/gists{/gist_id}","starred_url":"https://api.github.com/users/neoniousTR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neoniousTR/subscriptions","organizations_url":"https://api.github.com/users/neoniousTR/orgs","repos_url":"https://api.github.com/users/neoniousTR/repos","events_url":"https://api.github.com/users/neoniousTR/events{/privacy}","received_events_url":"https://api.github.com/users/neoniousTR/received_events","type":"User","site_admin":false},"created_at":"2018-12-04T08:57:18Z","updated_at":"2018-12-04T08:57:18Z","author_association":"NONE","body":"Sorry, I cannot give more than hints, as we do not have the capacity to debug further.\r\n\r\nWhat I can say:\r\n\r\n- It is the vanilla linker script, no changes\r\n- The amount of reserved regions is correct (8)\r\n- Data is just binary ones\r\n\r\nThe object files will be OK, because they do not have to be recompiled to get this working again. It is enough to just add additional string literals.\r\n\r\nBTW: We are also using Mac OS. So it could be an issue which only happens on Macs."}}
{"actor":{"display_login":"neoniousTR"}}