{"action":"created","issue":{"url":"https://api.github.com/repos/SmingHub/Sming/issues/632","repository_url":"https://api.github.com/repos/SmingHub/Sming","labels_url":"https://api.github.com/repos/SmingHub/Sming/issues/632/labels{/name}","comments_url":"https://api.github.com/repos/SmingHub/Sming/issues/632/comments","events_url":"https://api.github.com/repos/SmingHub/Sming/issues/632/events","html_url":"https://github.com/SmingHub/Sming/issues/632","id":138561093,"number":632,"title":"SDK 1.5.0 produce bigger image then 1.3.0, cause issue when downloading","user":{"login":"icodk","id":15612908,"avatar_url":"https://avatars.githubusercontent.com/u/15612908?v=3","gravatar_id":"","url":"https://api.github.com/users/icodk","html_url":"https://github.com/icodk","followers_url":"https://api.github.com/users/icodk/followers","following_url":"https://api.github.com/users/icodk/following{/other_user}","gists_url":"https://api.github.com/users/icodk/gists{/gist_id}","starred_url":"https://api.github.com/users/icodk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icodk/subscriptions","organizations_url":"https://api.github.com/users/icodk/orgs","repos_url":"https://api.github.com/users/icodk/repos","events_url":"https://api.github.com/users/icodk/events{/privacy}","received_events_url":"https://api.github.com/users/icodk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-04T19:17:39Z","updated_at":"2016-03-09T19:21:12Z","closed_at":null,"body":"Try to move from sdk 1.3.0 to 1.5.0, but image size. is too big and spiff_bin is overwriting 0x0A000.bin \r\nHere are the numbers for 1.3.0 :\r\n```\r\n#Memory / Section info:\r\n------------------------------------------------------------------------------\r\n   Section|                   Description| Start (hex)|   End (hex)|Used space\r\n------------------------------------------------------------------------------\r\n      data|        Initialized Data (RAM)|    3FFE8000|    3FFE8374|     884 (-44)\r\n    rodata|           ReadOnly Data (RAM)|    3FFE8380|    3FFEBE3C|   15036 (-312)\r\n       bss|      Uninitialized Data (RAM)|    3FFEBE40|    3FFF36F8|   30904 (+1776)\r\n      text|            Cached Code (IRAM)|    40100000|    4010575A|   22362 (-1296)\r\nirom0_text|           Uncached Code (SPI)|    4020A000|    402532D2|  299730 (-19840)\r\nTotal Used RAM : 46824\r\nFree RAM : 35096\r\nFree IRam : 10424\r\n------------------------------------------------------------------------------\r\n# Generating image...\r\n   Section|                   Description| Start (hex)|   End (hex)|Used space\r\n------------------------------------------------------------------------------\r\n      data|        Initialized Data (RAM)|    3FFE8000|    3FFE8374|     884\r\n    rodata|           ReadOnly Data (RAM)|    3FFE8380|    3FFEBE3C|   15036\r\n       bss|      Uninitialized Data (RAM)|    3FFEBE40|    3FFF36F8|   30904\r\n      text|          Uncached Code (IRAM)|    40100000|    4010575A|   22362\r\nirom0_text|             Cached Code (SPI)|    4020A000|    402532D2|  299730\r\n------------------------------------------------------------------------------\r\nEntry Point : 40100004 call_user_start()\r\nTotal Used RAM : 46824\r\nFree RAM : 35096\r\nFree IRam : 10406 or 26790 if 48k IRam\r\nGenerate firmware images successully in folder out/firmware.\r\nDone\r\n# Generating spiffs_bin\r\nChecking for spiffs files\r\nweb/dev directory exists. Creating out/firmware/spiff_rom.bin\r\nCreating rom 'out/firmware/spiff_rom.bin' of size 0x80000 (524288) bytes.\r\n.\r\n.\r\nout/firmware/spiff_rom.bin---------->0x54000\r\n```\r\nAnd the download command:\r\n```\r\n/c/Espressif/utils/esptool.exe -p COM5 -b 256000 write_flash -ff 40m -fm qio -fs 32m 0x00000 out/firmware/0x00000.bin 0xA000 out/firmware/0x0A000.bin    0x54000 out/firmware/spiff_rom.bin\r\n```\r\nNo conflict in download (spiffs_bin starts after 0x0A000.bin)\r\n```\r\nWriting at 0x00052c00... (99 %) \r\nWriting at 0x00053000... (100 %) \r\nWritten 300032 bytes in 13.93 seconds (172.28 kbit/s)...\r\nErasing flash...\r\nhead:  12 ;total: 128\r\nerase size :  475136\r\n\r\nWriting at 0x00054000... (0 %) \r\n```\r\n\r\nHere are the numbers for 1.5.0 :\r\n```\r\n#Memory / Section info:\r\n------------------------------------------------------------------------------\r\n   Section|                   Description| Start (hex)|   End (hex)|Used space\r\n------------------------------------------------------------------------------\r\n      data|        Initialized Data (RAM)|    3FFE8000|    3FFE83A0|     928 (+44)\r\n    rodata|           ReadOnly Data (RAM)|    3FFE83A0|    3FFEBF94|   15348 (+312)\r\n       bss|      Uninitialized Data (RAM)|    3FFEBF98|    3FFF3160|   29128 (-1776)\r\n      text|            Cached Code (IRAM)|    40100000|    40105C6A|   23658 (+1296)\r\nirom0_text|           Uncached Code (SPI)|    4020A000|    40258052|  319570 (+19840)\r\nTotal Used RAM : 45404\r\nFree RAM : 36516\r\nFree IRam : 9128\r\n------------------------------------------------------------------------------\r\n# Generating image...\r\n   Section|                   Description| Start (hex)|   End (hex)|Used space\r\n------------------------------------------------------------------------------\r\n      data|        Initialized Data (RAM)|    3FFE8000|    3FFE83A0|     928\r\n    rodata|           ReadOnly Data (RAM)|    3FFE83A0|    3FFEBF94|   15348\r\n       bss|      Uninitialized Data (RAM)|    3FFEBF98|    3FFF3160|   29128\r\n      text|          Uncached Code (IRAM)|    40100000|    40105C6A|   23658\r\nirom0_text|             Cached Code (SPI)|    4020A000|    40258052|  319570\r\n------------------------------------------------------------------------------\r\nEntry Point : 40100004 call_user_start()\r\nTotal Used RAM : 45404\r\nFree RAM : 36516\r\nFree IRam : 9110 or 25494 if 48k IRam\r\nGenerate firmware images successully in folder out/firmware.\r\nDone\r\n# Generating spiffs_bin\r\nChecking for spiffs files\r\nweb/dev directory exists. Creating out/firmware/spiff_rom.bin\r\nCreating rom 'out/firmware/spiff_rom.bin' of size 0x80000 (524288) bytes.\r\n.\r\n.\r\nout/firmware/spiff_rom.bin---------->0x58000\r\n```\r\nAnd the download command for 1.5.0:\r\n```\r\n/c/Espressif/utils/esptool.exe -p COM5 -b 256000 write_flash -ff 40m -fm qio -fs 32m 0x00000 out/firmware/0x00000.bin 0xA000 out/firmware/0x0A000.bin    0x58000 out/firmware/spiff_rom.bin\r\n```\r\nAnd the conflict in download (spiffs_bin starts at the same place the last chank from  0x0A000.bin):\r\n```\r\nWriting at 0x00057c00... (99 %) \r\nWriting at 0x00058000... (100 %) \r\nWritten 320512 bytes in 14.85 seconds (172.63 kbit/s)...\r\nErasing flash...\r\nhead:  8 ;total: 128\r\nerase size :  491520\r\n\r\nWriting at 0x00058000... (0 %) \r\nWriting at 0x00058400... (0 %) \r\n```"},"comment":{"url":"https://api.github.com/repos/SmingHub/Sming/issues/comments/194462592","html_url":"https://github.com/SmingHub/Sming/issues/632#issuecomment-194462592","issue_url":"https://api.github.com/repos/SmingHub/Sming/issues/632","id":194462592,"user":{"login":"hreintke","id":4587225,"avatar_url":"https://avatars.githubusercontent.com/u/4587225?v=3","gravatar_id":"","url":"https://api.github.com/users/hreintke","html_url":"https://github.com/hreintke","followers_url":"https://api.github.com/users/hreintke/followers","following_url":"https://api.github.com/users/hreintke/following{/other_user}","gists_url":"https://api.github.com/users/hreintke/gists{/gist_id}","starred_url":"https://api.github.com/users/hreintke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hreintke/subscriptions","organizations_url":"https://api.github.com/users/hreintke/orgs","repos_url":"https://api.github.com/users/hreintke/repos","events_url":"https://api.github.com/users/hreintke/events{/privacy}","received_events_url":"https://api.github.com/users/hreintke/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T19:21:11Z","updated_at":"2016-03-09T19:21:11Z","body":"@icodk : \r\nYes I referred to the 0x58000. It is the calculation of the first free sector after the application which fails on a boundary issue (both in makefile & framework). \r\nBy setting the SPIFF_START_OFFSET = 0x100000 & mount_manual you circumvent the issue.\r\n1/ Max Application size is 1MB, limitation of the cpu/architecture. \r\n2/ `irom0_text` : that is only part of the program size, I do not recall all the details now.\r\n3/image\r\nThe `irom0_0_seg :                         org = 0x4020A000, len = 0xF0000` tells the Linker at what relative location the application will be flashed. The len should be dependent on SPI_SIZE but that is not (yet ?) implemented in Sming. (Need some makefile magic, so if have that knowledge :smile: ).\r\n\r\nThe 0x4020A000 has two parts 1/ 0x40200000 -> The memory address by which the flash will be accessed. 2/ 0xA000 -> The offset.\r\nThe  0x4020A000 is the same when flashing the application on any 1MB boundary.\r\nThe actual flash location is First MB 0x0000000 second MB 0x100000 third MB 0x200000.....\r\n\r\nSo for application in third MB -> Linker 0x4020A000, flash location 0x20A000\r\n\r\nBut.. also the boot needs to know where the application to run is. That is handled by configuring rBoot.\r\n\r\n\r\n"}}