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

Increase background stack size to fix overflows with debug profile #10367

Merged
merged 1 commit into from Apr 17, 2019

Conversation

Projects
None yet
7 participants
@jeromecoutant
Copy link
Contributor

commented Apr 10, 2019

Description

Fix #9106

Test done with with NUCLEO_F091RC and GCC_ARM:

  • in developer profile:

================ THREAD STATS ===============
Name: rtx_idle
State: 1
Priority: 1
Stack Size: 512
Stack Space: 152

  • in debug profile:

================ THREAD STATS ===============
Name: rtx_idle
State: 1
Priority: 1
Stack Size: 768
Stack Space: 220

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@deepikabhavnani
@geobruce

@0xc0170 0xc0170 requested a review from c1728p9 Apr 10, 2019

},
"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

This comment has been minimized.

Copy link
@deepikabhavnani

deepikabhavnani Apr 10, 2019

Contributor

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

This comment has been minimized.

Copy link
@jeromecoutant

jeromecoutant Apr 10, 2019

Author Contributor

Why only ST targets is affected to debug memory increase ?

This comment has been minimized.

Copy link
@deepikabhavnani

deepikabhavnani Apr 10, 2019

Contributor

ST hal implementation uses more stack

This comment has been minimized.

Copy link
@jeromecoutant

jeromecoutant Apr 11, 2019

Author Contributor

OK, I will propose default value 0,
and update few ST targets.

See quick measurements in #9106

@ciarmcom ciarmcom requested review from deepikabhavnani and ARMmbed/mbed-os-maintainers Apr 10, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Apr 10, 2019

@jeromecoutant jeromecoutant force-pushed the jeromecoutant:PR_STACK_SIZE_DEBUG branch from ca4a5cb to 9b2ba12 Apr 11, 2019

#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

This comment has been minimized.

Copy link
@jeromecoutant

jeromecoutant Apr 11, 2019

Author Contributor

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.

@c1728p9

@jeromecoutant

This comment has been minimized.

Copy link
Contributor Author

commented Apr 11, 2019

Tested OK with NUCLEO_F072RB

@deepikabhavnani
Copy link
Contributor

left a comment

Looks good to me 👍

@cmonr

cmonr approved these changes Apr 12, 2019

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Apr 12, 2019

CI started

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Apr 12, 2019

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.

@cmonr cmonr added needs: CI and removed needs: review labels Apr 12, 2019

@mbed-ci

This comment has been minimized.

Copy link

commented Apr 12, 2019

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_exporter
@0xc0170

This comment has been minimized.

Copy link
Member

commented Apr 12, 2019

Exporters restarted - internal symlink error

@0xc0170

This comment has been minimized.

Copy link
Member

commented Apr 12, 2019

Waiting for @c1728p9 approval

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Apr 16, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Apr 16, 2019

CI restarted

@mbed-ci

This comment has been minimized.

Copy link

commented Apr 17, 2019

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 3
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Apr 17, 2019

@0xc0170 0xc0170 merged commit 5fb5e98 into ARMmbed:master Apr 17, 2019

26 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage Success
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 10324 cycles (-278 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B (+0.00%)
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
travis-ci/tools-py3.5 Local tools-py3.5 testing has passed
Details
travis-ci/tools-py3.6 Local tools-py3.6 testing has passed
Details
travis-ci/tools-py3.7 Local tools-py3.7 testing has passed
Details

@jeromecoutant jeromecoutant deleted the jeromecoutant:PR_STACK_SIZE_DEBUG branch Apr 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.