Skip to content

CONFIG_ARDUINO_RUNNING_CORE on ESP32-S2 #6019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
misery opened this issue Dec 14, 2021 · 5 comments
Closed

CONFIG_ARDUINO_RUNNING_CORE on ESP32-S2 #6019

misery opened this issue Dec 14, 2021 · 5 comments
Assignees
Labels
Chip: ESP32-S2 Issue is related to support of ESP32-S2 Chip

Comments

@misery
Copy link

misery commented Dec 14, 2021

I tried newest esphome with arduino-esp32 2.0.1. They check CONFIG_ARDUINO_RUNNING_CORE == 1 now and it fails as there is no disableCore1WDT.
It seems that CONFIG_ARDUINO_RUNNING_CORE on ESP32-S2 needs to be 0 instead of 1 like ESP32-C3 as it is single core, too.

src/esphome/components/esp32/core.cpp: In function 'void esphome::arch_init()':
src/esphome/components/esp32/core.cpp:50:3: error: 'disableCore1WDT' was not declared in this scope
   disableCore1WDT();
   ^~~~~~~~~~~~~~~
src/esphome/components/esp32/core.cpp:50:3: note: suggested alternative: 'disableCore0WDT'
   disableCore1WDT();
   ^~~~~~~~~~~~~~~
   disableCore0WDT
#if CONFIG_ARDUINO_RUNNING_CORE == 0
  disableCore0WDT();
#endif
#if CONFIG_ARDUINO_RUNNING_CORE == 1
  disableCore1WDT();
#endif

See esphome issue: esphome/issues#2816

@VojtechBartoska VojtechBartoska added the Chip: ESP32-S2 Issue is related to support of ESP32-S2 Chip label Dec 14, 2021
@Jason2866
Copy link
Collaborator

It is inconsistent and should be changed. I changed this setting in sdkconfig for the S2 and the builded Arduino framework does work with the S2

@me-no-dev
Copy link
Member

So this is some code that breaks in esphome and is part of esphome? They can check if the chip is unicore and set the running core to 0 or do not call the functions, just like here: https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal.h#L109

@oxan
Copy link

oxan commented Dec 17, 2021

So this is some code that breaks in esphome and is part of esphome?

We could workaround it in ESPHome (but it'll be an ugly #ifdef mess), but it doesn't make any sense to have CONFIG_ARDUINO_RUNNING_CORE set to 1 on a device that doesn't have core 1. Why not fix that in Arduino? That'll also help others that use this define in the future. It might not currently break anything in Arduino, but it surely cannot be correct either.

@Jason2866
Copy link
Collaborator

Jason2866 commented Dec 17, 2021

It just needs changes in this part https://github.com/espressif/esp32-arduino-lib-builder/blob/master/sdkconfig.esp32s2#L142-L162
and with the next lib build run it is consistent with the C3 build
Talking about consistency why do the CONFIG_ESP_INT_WDT_TIMEOUT_MS differs for the MCUs ?

@me-no-dev
Copy link
Member

Because we are about to release and we will not be updating the IDF libs, we need to change this in both places (here and the lib builder)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chip: ESP32-S2 Issue is related to support of ESP32-S2 Chip
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants