0

i have one project that can ready compiled. The function is break on the hardware an i need help to finde the error. I am a beginner and ask for help. How can I narrow the error down?

Sketch:

Platform

  • Hardware: AZDelivery NodeMCU Lua Amica Modul V2 ESP8266 ESP-12E
  • Core Version: latest git
  • Development Env: Arduino IDE
  • Operating System: Windows

Settings in IDE

  • Module: Nodemcu v1.0
  • Flash Size: 4MB
  • Flash Frequency: 40Mhz
  • CPU Frequency: 80Mhz
  • Upload Speed: 115200

Problem Description

15:54:11.662 -> Fatal exception 3(LoadStoreErrorCause):
15:54:11.662 -> epc1=0x4000e041, epc2=0x00000000, epc3=0x00000000, excvaddr=0x4024bcc2, depc=0x00000000
15:54:11.701 -> 
15:54:11.701 -> Exception (3):
15:54:11.701 -> epc1=0x4000e041 epc2=0x00000000 epc3=0x00000000 excvaddr=0x4024bcc2 depc=0x00000000
15:54:11.701 ->
15:54:11.701 -> >>>stack>>>
15:54:11.701 ->
15:54:11.701 -> ctx: cont
15:54:11.701 -> sp: 3ffffce0 end: 3fffffc0 offset: 01a0
15:54:11.701 -> 3ffffe80:  00000000 00000019 4024bcaa 00000000
15:54:11.701 -> 3ffffe90:  00000001 3fff16a4 00000000 000001ff
15:54:11.701 -> 3ffffea0:  00000000 00000019 401003fc 0001687b
15:54:11.701 -> 3ffffeb0:  00000000 00000000 00000001 4024bcaa
15:54:11.701 -> 3ffffec0:  00000000 00000019 3fff1134 4020ef28
15:54:11.701 -> 3ffffed0:  ffffffff 3fffc6fc 00000001 4024bcaa
15:54:11.741 -> 3ffffee0:  00000001 00000000 3fff1134 4020efc2
15:54:11.741 -> 3ffffef0:  00000019 00000000 3fff1134 4020f09d
15:54:11.741 -> 3fffff00:  40214e08 00000000 00001388 00000057
15:54:11.741 -> 3fffff10:  4020f060 3ffef254 4024bcaa 4021104d
15:54:11.741 -> 3fffff20:  3ffef10c 3ffef10c 3ffef254 40211275
15:54:11.741 -> 3fffff30:  007a1200 3ffef10c 3ffeeec0 402019b9
15:54:11.741 -> 3fffff40:  00000000 00000000 00000001 40100304
15:54:11.741 -> 3fffff50:  3ffef10c 00000000 3fff1134 4020f130
15:54:11.741 -> 3fffff60:  3ffef10c 3ffef254 0000000d 3ffef115
15:54:11.781 -> 3fffff70:  3ffef10c 3ffef254 3ffeeec0 402027dd
15:54:11.781 -> 3fffff80:  3fffdad0 00000000 3ffef728 3ffef768
15:54:11.781 -> 3fffff90:  3fffdad0 00000000 3ffef728 40202849
15:54:11.781 -> 3fffffa0:  3fffdad0 00000000 3ffef728 40212b68
15:54:11.781 -> 3fffffb0:  feefeffe feefeffe 3ffe8500 40101059
15:54:11.781 -> <<<stack<<<
15:54:11.781 -> 
15:54:11.781 ->  ets Jan  8 2013,rst cause:2, boot mode:(3,6)
15:54:11.781 -> 
15:54:11.781 -> load 0x4010f000, len 1392, room 16
15:54:11.821 -> tail 0
15:54:11.821 -> chksum 0xd0
15:54:11.821 -> csum 0xd0
15:54:11.821 -> v3d128e5c
15:54:11.821 -> ~ld
15:54:11.861 -> 

ESPExceptionDecoder Debug

Exception 3: LoadStoreError: Processor internal physical address or data error during load or store
PC: 0x4000e041
EXCVADDR: 0x4024bcc2

Decoding stack results
0x401003fc: millis() at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266\core_esp8266_wiring.cpp line 188
0x4020ef28: ClientContext::_write_some() at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/ClientContext.h line 514
0x4020efc2: ClientContext::_write_from_source(DataSource*) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/ClientContext.h line 450
0x4020f09d: WiFiClient::write(unsigned char const*, unsigned int) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/ClientContext.h line 364
0x4020f060: WiFiClient::write(unsigned char const*, unsigned int) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src\WiFiClient.cpp line 220
0x4021104d: Print::write(char const*) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266/Print.h line 60
0x40211275: Print::println(char const*) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266\Print.cpp line 129
0x402019b9: commands::HandleShortCommand() at D:\Temp\arduino_build_652018\sketch/commands.h line 363
0x40100304: ets_post(uint8, ETSSignal, ETSParam) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266\core_esp8266_main.cpp line 160
0x4020f130: ClientContext::_consume(unsigned int) at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi\src/include/ClientContext.h line 557
0x402027dd: serialEvent() at E:\Programme\Rasberry - Projekt\Projekt_FHEM\_Arduino\Firmware_SIGNALDUINO\SIGNALDuino-dev-r332_cc1101_200113\___funktionstuechtig_ESP\SIGNALESP/SIGNALESP.ino line 591
0x40202849: loop() at E:\Programme\Rasberry - Projekt\Projekt_FHEM\_Arduino\Firmware_SIGNALDUINO\SIGNALDuino-dev-r332_cc1101_200113\___funktionstuechtig_ESP\SIGNALESP/SIGNALESP.ino line 470
0x40212b68: loop_wrapper() at D:\Eigene Dateien\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266\core_esp8266_main.cpp line 180
  • Well it crashes somewhere related to either answering something via WiFi or a serial command in commands::HandleShortCommand(). What are you entering as input? – Maximilian Gerhardt Feb 8 at 13:34
  • The input ist only a command like V or ? link – user11528497 Feb 8 at 14:43
  • exactly. What have you inputted? And what is your line end setting in the serial monitor? – Maximilian Gerhardt Feb 8 at 14:50
  • I have to enter a V. If I look at the ESP with Netcat and type V, I get an answer. If I do the same with Putty Telnet (port 23), the stack comes :-( V V 3.4.0-dev SIGNALESP cc1101 (chip CC110 unknown) - compiled at Feb 8 2020 16:08:51 ? ? Use one of V R t X S P C r W s x e V With linebreak, but here ist it not view – user11528497 Feb 8 at 15:12
  • I'm assuming you're taking the sketch from github.com/RFD-FHEM/SIGNALDuino and this issue is from you? (github.com/RFD-FHEM/RFFHEM/issues/795) Which ino file are you using exactly? – Maximilian Gerhardt Feb 8 at 15:22
1

The problem is that code like

            MSG_PRINTLN(TXT_UNSUPPORTED1);

with

#define MSG_PRINTLN(...) { MSG_PRINTER.println(__VA_ARGS__); }

and

static const char TXT_UNSUPPORTED1[]        PROGMEM = "Unsupported short command";

On the ESP8266 calls the println() function which accepts a char*, expected from RAM. However since the string here was put into flash and not RAM, this function will crash upon execution.

The fix is to use the __FlashStringHelper class which calls the correct println() overload and doesn't crash.

See PR https://github.com/HomeAutoUser/ERROR_search/pull/1 and https://arduino-esp8266.readthedocs.io/en/latest/PROGMEM.html

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.