thoralt / esp8266wordclock

Wordclock with WS2812B RGB LED modules driven by an ESP8266 module
GNU General Public License v3.0
4 stars 10 forks source link

Fails to run in Wemos D1 mini #1

Open dakky opened 4 years ago

dakky commented 4 years ago

I tried to have this running on a wemos R1 mini.

When starting the module, i get a stack trace:

3fff13b0:  feefeffe feefeffe 3ffe8550 40100f51  
<<<stack<<<

 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

I tried to debug it and the error happens somewhere at my fork: [https://github.com/dakky/WordclockV3/blob/debugbranch/src/ledfunctions.cpp#L546](see here)

Here is the serial output with my debug messages:

ESP8266 WordClock setup() begin
Starting timer
Loading configuration
Reading EEPROM config
Starting LED module
DEBUG: 1
DEBUG:1
DEBUG:2
114
DEBUG:2.5
4

Any idea whats wrong here?

oh btw: the wemos has nothing attached to it yet. Just powered by usb.

dakky commented 4 years ago

update: i managed to "decrypt" the stack trace:

Exception 9: LoadStoreAlignmentCause: Load or store to an unaligned address
PC: 0x40201ef1
EXCVADDR: 0x40258eb6
Decoding stack results
dakky commented 4 years ago

a more detailed stacktrace:

Exception 9: LoadStoreAlignmentCause: Load or store to an unaligned address
PC: 0x402015f5: LEDFunctionsClass::setBuffer(unsigned char*, unsigned char const*, _palette_entry*) at C:\Users\dakky\AppData\Local\Temp\arduino_build_14834\sketch\ledfunctions.cpp line 570
EXCVADDR: 0x40256d26

Decoding stack results
0x4020f335: Print::write(char const*) at C:\Users\dakky\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266/Print.h line 60
0x4020f335: Print::write(char const*) at C:\Users\dakky\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266/Print.h line 60
0x4020f550: Print::println() at C:\Users\dakky\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266\Print.cpp line 178
0x402016d4: LEDFunctionsClass::set(unsigned char const*, _palette_entry*, bool) at C:\Users\dakky\AppData\Local\Temp\arduino_build_14834\sketch\ledfunctions.cpp line 514
0x402018a8: LEDFunctionsClass::renderHourglass(unsigned char, bool) at C:\Users\dakky\AppData\Local\Temp\arduino_build_14834\sketch\ledfunctions.cpp line 794
0x4020f5c4: Print::println(char const*) at C:\Users\dakky\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266\Print.cpp line 190
0x40203335: LEDFunctionsClass::process() at C:\Users\dakky\AppData\Local\Temp\arduino_build_14834\sketch\ledfunctions.cpp line 348
0x40213132: uart_write(uart_t*, char const*, size_t) at C:\Users\dakky\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266\uart.cpp line 498
0x4020ef60: HardwareSerial::write(unsigned char const*, unsigned int) at C:\Users\dakky\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266/HardwareSerial.h line 158
0x4020f335: Print::write(char const*) at C:\Users\dakky\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266/Print.h line 60
0x4020f335: Print::write(char const*) at C:\Users\dakky\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266/Print.h line 60
0x4020f550: Print::println() at C:\Users\dakky\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266\Print.cpp line 178
0x4020f5c4: Print::println(char const*) at C:\Users\dakky\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266\Print.cpp line 190
0x40203478: LEDFunctionsClass::setMode(DisplayMode) at C:\Users\dakky\AppData\Local\Temp\arduino_build_14834\sketch\ledfunctions.cpp line 472
0x4020f335: Print::write(char const*) at C:\Users\dakky\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266/Print.h line 60
0x40213132: uart_write(uart_t*, char const*, size_t) at C:\Users\dakky\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266\uart.cpp line 498
0x4020e671: Adafruit_NeoPixel::updateLength(unsigned short) at C:\Users\dakky\Documents\Arduino\libraries\Adafruit_NeoPixel\Adafruit_NeoPixel.cpp line 131
0x40213a50: malloc(size_t) at C:\Users\dakky\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266\umm_malloc\umm_malloc.cpp line 1677
0x4010035c: __digitalWrite(uint8_t, uint8_t) at C:\Users\dakky\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266\core_esp8266_wiring_digital.cpp line 85
0x4020e62c: Adafruit_NeoPixel::begin() at C:\Users\dakky\Documents\Arduino\libraries\Adafruit_NeoPixel\Adafruit_NeoPixel.cpp line 114
0x40201514: LEDFunctionsClass::begin(int) at C:\Users\dakky\AppData\Local\Temp\arduino_build_14834\sketch\ledfunctions.cpp line 310
0x4020462c: setup() at C:\Users\dakky\devzone\private\WordclockV3\src/src.ino line 206
0x402040c4: timerCallback() at C:\Users\dakky\devzone\private\WordclockV3\src/src.ino line 85
0x4021e26c: std::_Function_base::_Base_manager ::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation) at c:\users\dakky\documents\arduinodata\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-3-20ed2b9\xtensa-lx106-elf\include\c++\4.8.2/functional line 1934
0x4021e258: std::_Function_handler ::_M_invoke(std::_Any_data const&) at c:\users\dakky\documents\arduinodata\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-3-20ed2b9\xtensa-lx106-elf\include\c++\4.8.2/functional line 2069
0x402114b0: loop_wrapper() at C:\Users\dakky\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266\core_esp8266_main.cpp line 122

it points to this code fragment: currentDWord = buf[i >> 2]; in ledfunctions.cpp

akamming commented 3 years ago

I had the same issue, fixed by

now i could succesfully compile and run without exceptions. Next is debug the web interface, cause it does not appear i get:

File Not Found

URI: /
Method: GET
Arguments: 0
schoki99 commented 2 years ago

I had the same issue.

File Not Found

URI: / Method: GET Arguments: 0

akamming commented 2 years ago

I had the same issue.

File Not Found

URI: / Method: GET Arguments: 0

This is not an issue. The sketch data was not uploaded. Can be done using this link

i had several issues with the code, most importantly loosing network connections and watchdog resets.

i am now fixing them one-by-one, cause i reallly like this project. Happy to make a PR. My fork is here