-
Notifications
You must be signed in to change notification settings - Fork 3k
Increase background stack size to fix overflow #4563
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
Conversation
Bump the background stack size to 512 bytes to fix stack overflows on the NRF52 and so it is the same size as it was before the switch to RTX5.
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputBuild failed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, it fix the idle loop on the NRF52840.
@c1728p9 Looks like this caused some examples to no longer fit into 16KB. |
The stack required for the idle thread is highly dependent on the target because it will call the sleep function which is target specific. While 256 bytes of stack is enough for most targets, others like the NRF52840 might require more. With this change, target maintainers can specify the idle thread stack size in their mbed_rtx.h file.
A stack size of 256 bytes is not enough on the NRF52840, this patch changes it to a size of 512 bytes.
@c1728p9 I've extended your PR by allowing targets to override the default value of the idle thread stack size. It makes a lot of sense to let it be defined at targets level because the amount of stack needed is directly correlated to the sleep function which is target specific. @0xc0170 Please review. |
@pan- should this be a config option? |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Bump the background stack size to 512 bytes to fix stack overflows on the NRF52 and so it is the same size as it was before the switch to RTX5.