These are chat archives for SmingHub/Sming

14th
Aug 2017
frankdownunder
@frankdownunder
Aug 14 2017 05:08

Has anyone got MeteoControl demo to work?
Ive been trying, and the latest of my problems occurs on sendTemplate, the stack trace is as below.
(I navigated to 192.168.4.1/config )

void onConfiguration(HttpRequest &request, HttpResponse &response)
{
MeteoConfig cfg = loadConfig();
. . . . .
vars["RMax"] = String(cfg.RangeMax, 2);
response.sendTemplate(tmpl); <<<<<<<<<<<<<<<<<<<<<<
}

Program output near the error:
READ Template (0)
read errno -10010

The error itself

* Fatal exception 3
pc=0x40237d7e sp=0x3ffff270 excvaddr=0x40000960
ps=0x00000030 sar=0x00000000 vpri=0xffffffff
r00: 0x40241a50=1076107856 r01: 0x3ffff270=1073738352 r02: 0x40000960=1073744224
r03: 0x0000007b= 123 r04: 0x4000cdb6=1073794486 r05: 0x7a13006e=2048065646
r06: 0x80808080=-2139062144 r07: 0x0100ff01= 16842497 r08: 0x7911ff6d=2031222637
r09: 0xffffffff= -1 r10: 0xfefefeff= -16843009 r11: 0x7b7b7b7b=2071690107
r12: 0x3fff3cd8=1073691864 r13: 0x3ffff4d0=1073738960 r14: 0x0000d8e6= 55526
r15: 0x3fff3cd8=1073691864

java -jar EspStackTraceDecoder.jar /opt/esp-open-sdk/xtensa-lx106-elf/bin/xtensa-lx106-elf-addr2line ./out/build/app.out err.log
Exception Cause: Not found

0x40237d7e: memchr at C:\DEV\ESP8266\esp_microc/string/memchr.c:20 (discriminator 2)
0x40241a50: TemplateFileStream::readMemoryBlock(char, int) at /opt/Sming/Sming/SmingCore/DataSourceStream.cpp:253
0x40000960: ?? ??:0
0x4000cdb6: ?? ??:0
0x4023e0fc: m_printf at /opt/Sming/Sming/system/m_printf.cpp:110
0x4024084a: fileSeek(short, int, SeekOriginFlags) at /opt/Sming/Sming/SmingCore/FileSystem.cpp:177
0x40241375: FileStream::readMemoryBlock(char
, int) at /opt/Sming/Sming/SmingCore/../SmingCore/../Wiring/WHashMap.h:131
0x40241a30: TemplateFileStream::readMemoryBlock(char, int) at /opt/Sming/Sming/SmingCore/DataSourceStream.cpp:248
0x4000cdb6: ?? ??:0
0x402440c9: TcpConnection::write(IDataSourceStream
) at /opt/Sming/Sming/SmingCore/Network/TcpConnection.cpp:261
. . . .
0x4023e870: String::~String() at /opt/Sming/Sming/Wiring/WString.cpp:701
0x402478f8: HttpResponse::sendTemplate(TemplateFileStream) at /opt/Sming/Sming/SmingCore/Network/Http/HttpResponse.cpp:48
0x40210930: free at C:\DEV\ESP8266\esp_microc/malloc/malloc.c:15
0x4023e944: String::move(String&) at /opt/Sming/Sming/Wiring/WString.cpp:701
0x4023e870: String::~String() at /opt/Sming/Sming/Wiring/WString.cpp:701
0x4023c9e9: onConfiguration(HttpRequest&, HttpResponse&) at /home/frank/esp8266projects/MeteoControl//app/webserver.cpp:59
0x40000a65: ?? ??:0
0x4023e8f2: String::copy(char const
, unsigned int) at /opt/Sming/Sming/Wiring/WString.cpp:701
etc . . .

BotoX
@BotoX
Aug 14 2017 12:03
Hmm so if I add an HttpServer to my application I get Detected overlap at address: 0xa000 for file: out/firmware/0x0a000.bin
I have 4MB flash (configured correctly in the makefile) and use SPIFFS too, I can't have that much code to fill the 4MB already
memory / section info: https://p.botox.bz/view/raw/8cb9af63
BotoX
@BotoX
Aug 14 2017 12:12
oh I see, so Sming is at 0x0a000 and my application is at 0x00000
since my application is 0x0b3f0 in size it overlaps with sming
why is the flash so underused by sming
and why not put sming first since the size should be somewhat known, no?
BotoX
@BotoX
Aug 14 2017 12:33
and the develop branch seems to have fixed my issue