-
Notifications
You must be signed in to change notification settings - Fork 3k
Increase background stack size to fix overflows with debug profile #10367
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
rtos/mbed_lib.json
Outdated
}, | ||
"idle-thread-stack-size-debug-extra": { | ||
"help": "Additional size to add to the idle thread when tickless is enabled and LPTICKER_DELAY_TICKS is used", | ||
"value": 256 |
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.
Some low end devices might fail because of limited memory, shall we keep this as 0 as default and update it to 256 for all ST targets only?
Also please verify this addition for TARGET_STM32F070RB and TARGET_STM32F072RB
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.
Why only ST targets is affected to debug memory increase ?
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.
ST hal implementation uses more stack
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.
OK, I will propose default value 0,
and update few ST targets.
See quick measurements in #9106
@jeromecoutant, thank you for your changes. |
ca4a5cb
to
9b2ba12
Compare
#ifdef MBED_CONF_APP_IDLE_THREAD_STACK_SIZE | ||
#define OS_IDLE_THREAD_STACK_SIZE (MBED_CONF_APP_IDLE_THREAD_STACK_SIZE + EXTRA_IDLE_STACK) | ||
#define OS_IDLE_THREAD_STACK_SIZE MBED_CONF_APP_IDLE_THREAD_STACK_SIZE |
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.
I changed this line,
as I think that different calculation for idle size value depending on tickless and/or debug
is needed only if the user doesn't specify explicitly the needed and expected size.
Tested OK with NUCLEO_F072RB |
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.
Looks good to me 👍
CI started |
LGTM, but @ARMmbed/mbed-os-maintainers should this come into a patch or a feature release? This very much adds new functionality, but it appears small enough and targeted enough that it could warrant a patch release. |
Test run: FAILEDSummary: 1 of 11 test jobs failed Failed test jobs:
|
Exporters restarted - internal symlink error |
Waiting for @c1728p9 approval |
CI restarted |
Test run: FAILEDSummary: 1 of 11 test jobs failed Failed test jobs:
|
Description
Fix #9106
Test done with with NUCLEO_F091RC and GCC_ARM:
================ THREAD STATS ===============
Name: rtx_idle
State: 1
Priority: 1
Stack Size: 512
Stack Space: 152
================ THREAD STATS ===============
Name: rtx_idle
State: 1
Priority: 1
Stack Size: 768
Stack Space: 220
Pull request type
Reviewers
@deepikabhavnani
@geobruce