Skip to content

esp32s2: Correct port_stack_get_top() #3668

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

Merged
merged 1 commit into from
Nov 10, 2020

Conversation

jepler
Copy link

@jepler jepler commented Nov 10, 2020

The main stack is bigger than CONFIG_ESP_MAIN_TASK_STACK_SIZE -- an "extra" size is added to it (TASK_EXTRA_STACK_SIZE). This total size is available as ESP_TASK_MAIN_STACK. Presumably TASK_EXTRA_STACK_SIZE is additional stack that can be used by the esp-idf runtime. But what's important for us is that some very outermost stack frames, such as pyexec_friendly_repl, could lie inside the "extra" area and be invisible to the garbage collector.

Closes #3649

@tannewt tannewt self-requested a review November 10, 2020 18:54
@tannewt tannewt added bug espressif applies to multiple Espressif chips labels Nov 10, 2020
@tannewt tannewt added this to the 6.x.x - Bug Fixes milestone Nov 10, 2020
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.

Nice find! Thank you!

@tannewt tannewt merged commit 75a977f into adafruit:main Nov 10, 2020
@jepler jepler deleted the esp32s2-stack-size branch November 3, 2021 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug espressif applies to multiple Espressif chips
Projects
None yet
Development

Successfully merging this pull request may close these issues.

metro esp32s2 after NameError
2 participants