Skip to content

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

Merged
merged 3 commits into from
Jun 19, 2017

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Jun 14, 2017

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.

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.
@sg-
Copy link
Contributor

sg- commented Jun 15, 2017

/morph test

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 560

Build failed!

Copy link
Member

@pan- pan- left a 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.

@theotherjimmy
Copy link
Contributor

@c1728p9 Looks like this caused some examples to no longer fit into 16KB.

pan- added 2 commits June 16, 2017 10:11
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.
@pan-
Copy link
Member

pan- commented Jun 16, 2017

@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.

@theotherjimmy
Copy link
Contributor

@pan- should this be a config option?

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 17, 2017

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 576

All builds and test passed!

@theotherjimmy theotherjimmy merged commit d806121 into ARMmbed:master Jun 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants