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

AP_HAL_ESP32: reduce scheduler stack sizes #28708

Merged
merged 2 commits into from
Nov 23, 2024

Conversation

srmainwaring
Copy link
Contributor

Breaking out 2f86e14 from @davidbuzz's larger PR #28514 and adding minor alignment formatting.

name prev new change
TIMER_SS 4096 1024*3 -1024
MAIN_SS 8192 1024*5 -3072
RCIN_SS 4096 1024*3 -1024
RCOUT_SS 4096 1024*1.5 -2560
WIFI_SS1 6192 1024*2.25 -3888
WIFI_SS2 6192 1024*2.25 -3888
UART_SS 2048 1024*2.25 -256
DEVICE_SS 4096 1024*4 0
IO_SS 4096 1024*3.5 -512
STORAGE_SS 8192 1024*2 -6144

Testing

  • Tested on esp32 (esp32empty) and esp32s3 (esp32s2stampfly).

davidbuzz and others added 2 commits November 22, 2024 10:09
@tpwrules
Copy link
Contributor

Overall this is just to save RAM I imagine?

Judging by Google results, ESP-IDF has a stack canary by default so hopefully we can track future problems back to this if they are reproducible on the bench.

@srmainwaring
Copy link
Contributor Author

Overall this is just to save RAM I imagine?

Yes, imagine so. @davidbuzz did the detailed analysis. It does resolve an issue on esp32empty where on master the EKF3 is currently reporting a failure to lack of memory (once you get past the RMT buffer issue by disabling RCIN).

Copy link
Contributor

@tpwrules tpwrules left a comment

Choose a reason for hiding this comment

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

Seems to fly okay on the stampfly.

Was able to reduce e.g. the device stack size and get a stack overflow error on the console.

@tpwrules tpwrules merged commit 7c1af5a into ArduPilot:master Nov 23, 2024
8 checks passed
@srmainwaring srmainwaring deleted the prs/pr-eps32-stack-size branch November 23, 2024 22:39
Copy link
Collaborator

@davidbuzz davidbuzz left a comment

Choose a reason for hiding this comment

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

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants