Skip to content

Wemos D1 mini Pro crashes in debug mode because of watchdog reset #14

@breezer15

Description

@breezer15

Hi,

I wanted to run the pool controller on a "Wemos D1 mini Pro".

Unfortunately the ESP always crashed (WDT reset), see in the log.

The code is only executable when I change "build_type = debug" to "build_type = release" in the platformio.ini.

Is it possible that the code is too slow in debug mode or that the serial interface is too slow and the watchdog is triggered as a result?

Many greetings

log:

11:29:27.817 > ✖ /homie/config.json doesn't exist

11:29:27.817 > Configuration invalid. Using CONFIG MODE

11:29:27.817 > 💡 Firmware pool-controller (2.0.0)

11:29:27.817 > 🔌 Booting into config mode 🔌

11:29:27.817 > Device ID is f4cfa2d0904a

11:29:27.817 > AP started as smart-swimmingpool-f4cfa2d0904a with IP 192.168.123.1

11:29:27.817 > 1227 [DEBUG]: void setup(): ngpool-f4cfa2d0904a
11:29:27.817 > Free heap: 31080

11:29:27.817 > Triggering Wi-Fi scan...

11:29:35.377 > 

11:29:35.378 >  ets Jan  8 2013,rst cause:4, boot mode:(3,7)

11:29:35.378 > 

11:29:35.378 > wdt reset

11:29:35.378 > load 0x4010f000, len 3656, room 16 

11:29:35.384 > tail 8

11:29:35.385 > chksum 0x0c

11:29:35.385 > csum 0x0c

11:29:35.385 > v9c56ed1f

11:29:35.385 > ~ld
11:29:35.456 > 72 [DEBUG]: void setup(): Before Homie setup())
11:29:36.547 > ✖ /homie/config.json doesn't exist

11:29:36.548 > Configuration invalid. Using CONFIG MODE

11:29:36.625 > 💡 Firmware pool-controller (2.0.0)

11:29:36.626 > 🔌 Booting into config mode 🔌

11:29:36.626 > Device ID is f4cfa2d0904a

11:29:36.626 > AP started as smart-swimmingpool-f4cfa2d0904a with IP 192.168.123.1

11:29:36.626 > 1228 [DEBUG]: void setup(): ngpool-f4cfa2d0904a
11:29:36.626 > Free heap: 31080

11:29:36.626 > Triggering Wi-Fi scan...

11:29:44.999 > 

11:29:44.999 >  ets Jan  8 2013,rst cause:4, boot mode:(3,7)

11:29:44.999 > 

11:29:44.999 > wdt reset

11:29:44.999 > load 0x4010f000, len 3656, room 16 

11:29:45.006 > tail 8

11:29:45.006 > chksum 0x0c

11:29:45.006 > csum 0x0c

11:29:45.006 > v9c56ed1f

11:29:45.006 > ~ld

platformio.ini:

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]
;default_envs = esp32dev
;default_envs = nodemcuv2
default_envs = d1_mini_pro

[common]
; build_flags = -g -DDEBUG_PORT=Serial
;Add the PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY build flag to ensure reliable OTA updates.
build_flags = -D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY

; serial_speed = 74880
serial_speed = 115200

; You MUST inject these options into [env:] section
; using ${common_env_data.***} (see below)
[common_env_data]
lib_deps =
	DallasTemperature
	Wire
	paulstoffregen/OneWire
	Adafruit Unified Sensor
	DHT sensor library
	RelayModule
	NTPClient @ 3.1.0
	TimeZone @ 1.2.4
	ArduinoJson @ 6.18.0
	me-no-dev/ESP Async WebServer
  	thomasfredericks/Bounce2
  	marvinroger/AsyncMqttClient
	Homie
	; git+https://github.com/xoseperez/Time.git
	; git+https://github.com/homieiot/homie-esp8266.git#develop
	;../homie-esp8266

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
build_flags = -D SERIAL_SPEED=${common.serial_speed}
build_unflags = -Werror=reorder
lib_deps = ${common_env_data.lib_deps}
monitor_speed = ${common.serial_speed}

; Monitor filters: https://docs.platformio.org/en/latest/core/userguide/device/cmd_monitor.html#filters
monitor_filters = esp32_exception_decoder, log2file, time, default

upload_speed = 230400
;upload_protocol = esptool
;upload_port = 192.168.178.23
;upload_flags =
;  --timeout=20
;  --port=3232
;   --auth=st25277472

; Unit Testing options
test_ignore = test_desktop

[env:nodemcuv2]
platform = espressif8266 @ 2.5.0
board = nodemcuv2
framework = arduino
build_type = debug
build_flags = -D SERIAL_SPEED=${common.serial_speed}
lib_deps = ${common_env_data.lib_deps}
monitor_speed = ${common.serial_speed}

; Monitor filters: https://docs.platformio.org/en/latest/core/userguide/device/cmd_monitor.html#filters
monitor_filters = esp8266_exception_decoder, log2file, time, default

upload_speed = 230400
test_ignore = test_desktop

[env:d1_mini_pro]
platform = espressif8266 @ 2.5.0
board = d1_mini_pro
board_build.filesystem = SPIFFS
board_build.ldscript = eagle.flash.8m7m.ld
framework = arduino
build_type = debug
build_flags = -D SERIAL_SPEED=${common.serial_speed}
lib_deps = ${common_env_data.lib_deps}
monitor_speed = ${common.serial_speed}

; Monitor filters: https://docs.platformio.org/en/latest/core/userguide/device/cmd_monitor.html#filters
monitor_filters = esp8266_exception_decoder, log2file, time, default

upload_speed = 115200

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions