Chat here about code rewrites, mods, etc... with respect to the github project https://github.com/esp8266/Arduino

Moderator: igrr

User avatar
By dannybackx
#33787 Hi, I am building an app so an ESP8266-12 with e.g. a motion sensor can be queried using the UPnP protocols. See https://github.com/dannybackx/arduino-upnp .

This is my first development in this environment so I am probably doing some things wrong.

Question #1 is how I can debug something like this. Can I use information such as the crash dump below to figure out what's going on ? On other mobile platforms, I have been able to debug remote apps via gdb. Is this possible here as well ?

Question #2 is if I'm doing something obvious wrong in my code. The app sometimes runs for a while (if I comment out pieces of it), the version currently on github crashes very quickly.

Thanks for any input,
Danny
----
Boot version 31
Flash chip Real size 4194304, size 4194304
SDK version 1.2.0
Starting WiFi... MAC 5C:CF:7F:06:72:4C, SSID {xxxxxxxxxxxxx}, IP address 192.168.1.44
Mode: STA
PHY mode: N
Channel: 1
AP id: 0
Status: 5
Auto connect: 1
SSID (13): xxxxxxxxxxxxx
Passphrase (10): xxxxxxxxxx
BSSID set: 0
Starting HTTP...
Starting SSDP...
SSDP UUID: 38323636-4558-4dda-9188-cda0e606724c
UPnP begin(3ffea5a0, 3ffea238)
UPnPService ctor
UPnPService.addAction(GetState,_,<action><name>getState</name><argumentList><argument><retval/><name>State</name><relatedStateVariable>State</relatedStateVariable><direction>out</direction></argument></argumentList></action>)
UPnPService.addStateVariable(State,string,1)
Ready!
Sending Notify to 239.255.255.250:1900
Sending Response to 192.168.1.63:65288

Exception (28):
epc1=0x40101802 epc2=0x00000000 epc3=0x00000000 excvaddr=0x027f67e4 depc=0x00000000

ctx: sys
sp: 3ffff630 end: 3fffffb0 offset: 01a0

>>>stack>>>
3ffff7d0: 00000024 00000001 40211cdf 3ffffebc
3ffff7e0: 3fff68fc 3fff5e70 3ffffebc 3ffeb50c
3ffff7f0: 00000000 40211b4f 3fff5e70 3ffffebc
3ffff800: 3fff68fc 3fff5e74 3ffff86f 40209424
3ffff810: 7f5e0001 2db4faff 4020bc10 00010b06
3ffff820: 3fff68fc 3ffffebc 3ffeb50c 40206fdd
3ffff830: 3ffff86b 3fff5e74 00000011 00000000
3ffff840: 000000ff 00000014 3ffff86a 4020bb86
User avatar
By kolban
#33797 The exception code includes "epc1" which is the program counter value in effect when the exception occurred. You can use this with a map of your linked program to determine the exact assembler instruction being executed. At a minimum, you can find the names of the function you were in when the exception occurred.
User avatar
By dannybackx
#33881 /home/danny/src/sketchbook/esp8266/libraries/GDBStub/src/GDBStub.c:29:29: fatal error: xtensa/corebits.h: No such file or directory

Did I overlook some instruction, something appears to be missing from my environment.

Danny