Skip to content
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

turn off CONFIG_ESP_SYSTEM_HW_STACK_GUARD for all relevant Espressif builds #9748

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Oct 23, 2024

Fixes #9749.

The MicroPython folks discovered this ESP-IDF bug: espressif/esp-idf#14456, which can be worked around by doing CONFIG_ESP_SYSTEM_HW_STACK_GUARD=n on both ESP32-C3 and ESP32-C6. See
espressif/esp-idf#14456
micropython#15667
micropython#15771
micropython#15997
I saw this initially and kept in mind. It sounded similar to #9749: a crash after a few minutes on C3 when using wifi.

I tested on a C3. With this fix the test program in #9749 ran for hours before I manually stopped it. Without it, it usually got a hard fault within a few minutes.

@dhalbert dhalbert requested review from tannewt and jepler October 23, 2024 03:10
@dhalbert dhalbert changed the title d for ESP32-C3 and ESP32-C6 CONFIG_ESP_SYSTEM_HW_STACK_GUARD=n for ESP32-C3 and ESP32-C6 Oct 23, 2024
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please match the generated style for disable so that when it gets auto-changed it is consistent. Yes, kconfig is weird using comments in a disable.

ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults Outdated Show resolved Hide resolved
ports/espressif/esp-idf-config/sdkconfig-esp32c6.defaults Outdated Show resolved Hide resolved
ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults Outdated Show resolved Hide resolved
@dhalbert
Copy link
Collaborator Author

dhalbert commented Oct 23, 2024

CONFIG_ESP_SYSTEM_HW_STACK_GUARD is enabled when SOC_ASSIST_DEBUG_SUPPORTED is defined, which is true for ESP32-C2, C3, C6, P4, and will eventually be true for C5 and C61, according to comments in ESP-IDF. So I just turned it off with not set in sdkconfig.defaults.`

@dhalbert dhalbert changed the title CONFIG_ESP_SYSTEM_HW_STACK_GUARD=n for ESP32-C3 and ESP32-C6 turn off CONFIG_ESP_SYSTEM_HW_STACK_GUARD for all relevant Espressif builds Oct 23, 2024
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@dhalbert dhalbert merged commit aa28570 into adafruit:main Oct 23, 2024
221 checks passed
@dhalbert dhalbert deleted the disable-c3-c6-stack-guard branch October 23, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hard fault crash when using HTTPServer: ESP32-C3
2 participants