Open nickolay opened 11 months ago
You've defined board: esp32-s3-devkitc-1
, so why does it matter what is in the lilygo board definition that you're not using? Why do you need to override the working config with something that doesn't work? You don't need any of those build_flags:
.
Thanks for your prompt reply.
You've defined board: esp32-s3-devkitc-1 ... Why do you need to override the working config with something that doesn't work?
I have provided a self-contained example to demonstrate the underlying problem of esphome using the wrong #define.
You can instead download and use the board definition, which itself includes this ARDUINO_RUNNING_CORE=0 define (and other users are doing so, it's just more steps until the board definition is included in platformio https://github.com/platformio/platform-espressif32/issues/1269).
You can see I have asked the board vendor about the reason for this define https://github.com/Xinyuan-LilyGO/LilyGo-EPD47/issues/107 too and I'm indeed going to try to work around the problem by omitting it.
Still I don't see the reason for esphome to test CONFIG_ARDUINO_RUNNING_CORE
instead of ARDUINO_RUNNING_CORE
. Do you?
I don't know the reason. Probably whoever wrote that didn't know the difference either. Why are there two different defines? Anyway, that really seems like a mistake in the board definition. It seems to me that it would cause huge performance issues. You could make an esphome PR to change it if you want and hopefully there's someone that knows more about that who can review it.
Why are there two different defines?
The commit adding the ARDUINO_RUNNING_CORE doesn’t explain it very well, but I think that the CONFIG_
one is managed via Kconfig, which is out of reach for basic arduino users.
Anyway, that really seems like a mistake in the board definition.
It could be, but we might as well not punish the user of such a board with a wdt crash:)
You could make an esphome PR to change it
Will do, unless someone beats me to it.
Thanks again!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The problem
Consider:
loopTask
is pinned toARDUINO_RUNNING_CORE
CONFIG_ARDUINO_RUNNING_CORE
, which is pre-set to 1 on ESP32-S3.ARDUINO_RUNNING_CORE
is "configurable" independently fromCONFIG_ARDUINO_RUNNING_CORE
In my case the lilygo-t5-47-plus board manifest overrides
ARDUINO_RUNNING_CORE=0
causing a mismatch: arduino/esphome runs on core 0, while disabling the "IDLE task" watchdog on core 1.This causes random crashes — in my project it was shortly on the first startup; when connecting to wi-fi) during yield() in Application::setup(), but depending on the specific components used the crash may disappear or render the board unusable crashing on startup.
Suggestion: change esphome to use
ARDUINO_RUNNING_CORE
instead.Which version of ESPHome has the issue?
2023.12.5
What type of installation are you using?
pip
Which version of Home Assistant has the issue?
-
What platform are you using?
ESP32
Board
lilygo-t5-47-plus
Component causing the issue
esp32
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
core.dump.parsed.txt