Sming - Open Source framework for high efficiency native ESP8266 development

User avatar
By dereulenspiegel
#28988 Thank you very much. This solved my problem. I have now set SPIFF_SIZE = 192000 in Makefile-user.mk and it works now :)
Just a question out of curiosity (and only if you have the time to answer): Why is spiff ROM which is too large causing such a problem? I would assume that esptool is starting to write at the specified offset and that if it writes at an address too high it either gets an error or nothing is actually written. Why is this causing problems for lower addresses so that the ESP doesn't execute my code anymore?
User avatar
By alonewolfx2
#29034 Because of flash mapping. Last 4k of flash is something like espressif sdk area. If your spiff bigger than that area, esptool writing that sdk sectors and firmware failing. If you need bigger flash size you need to buy 32mbit modules.

BTW. Here is our sming chat link. We have a lot of active and good people. We can help you any issue. https://gitter.im/alonewolfx2/Sming
dereulenspiegel wrote:Thank you very much. This solved my problem. I have now set SPIFF_SIZE = 192000 in Makefile-user.mk and it works now :)
Just a question out of curiosity (and only if you have the time to answer): Why is spiff ROM which is too large causing such a problem? I would assume that esptool is starting to write at the specified offset and that if it writes at an address too high it either gets an error or nothing is actually written. Why is this causing problems for lower addresses so that the ESP doesn't execute my code anymore?
User avatar
By dereulenspiegel
#29075 Thanks for the explanation and for the link to the chat. In the future I will ask questions here if appropriate. Although I like forums better most of the time, since people with a similar problem can find this thread :)
User avatar
By asura
#29518 I have similar problem with my code (Same problem with HtttpServer_Websocket example aswell). But I'm using esp12 with 4mb of flash. Unfortunately I couldn't get the problem resolved by changing SPIFF_SIZE in my user make file .

Here is my make output

Code: Select allMemory / Section info:
------------------------------------------------------------------------------

out/build/app.out:     file format elf32-xtensa-le

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .data         00000540  3ffe8000  3ffe8000  000000e0  2**4
                  CONTENTS, ALLOC, LOAD, DATA
  1 .rodata       00001db4  3ffe8540  3ffe8540  00000620  2**4
                  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          00009d60  3ffea2f8  3ffea2f8  000023d8  2**4
                  ALLOC
  3 .irom0.text   0003653e  40209000  40209000  00007b30  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  4 .text         00005757  40100000  40100000  000023d4  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
------------------------------------------------------------------------------
# Generating image...
Generate firmware images successully in folder out/firmware.
Done
stat: invalid option -- '%'
Try 'stat --help' for more information.
# Generating spiffs_bin
Checking for spiffs files
files directory exists. Creating out/firmware/spiff_rom.bin
Creating rom spiff_rom.bin of size 262144 bytes
Adding files in directory files
Unable to read file .
Unable to read file ..
index.html added to spiffs (1637 bytes)
out/firmware/spiff_rom.bin---------->0xC000


After make flash. My console log stops with out file system init

Code: Select allbash-3.2$ make flash
stat: invalid option -- '%'
Try 'stat --help' for more information.
Killing Terminal to free /dev/tty.SLAB_USBtoUART
/opt/esp-open-sdk/esptool/esptool.py -p /dev/tty.SLAB_USBtoUART -b 115200 write_flash -ff 40m -fm qio -fs 4m 0x00000 out/firmware
/0x00000.bin 0x09000 out/firmware/0x09000.bin 0xC000 out/firmware/spiff_rom.bin
Connecting...
Erasing flash...
Writing at 0x00007800... (100 %)
Erasing flash...
Writing at 0x0003f400... (100 %)
Erasing flash...
Writing at 0x0004bc00... (100 %)

Leaving...
python -m serial.tools.miniterm /dev/tty.SLAB_USBtoUART 115200
--- Miniterm on /dev/tty.SLAB_USBtoUART: 115200,8,N,1 ---
--- Quit: Ctrl+]  |  Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---