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
Allow mbed_app.json to override OS_IDLE_THREAD_STACK_SIZE for Nordic targets #5801
Comments
I checked, there are at least 2 platforms that define this macro, none use ifndef.
For this, I assume instead of NULL, there could be a name:
@pan- @ARMmbed/team-nordic |
For the names in idle thread and timer threads, can you create an issue in CMSIS 5: https://github.com/ARM-software/CMSIS_5/ with details , to understand the use case and make this request upstream. It could be configurable (default NULL as it is). |
@bulislaw Is there any plan to allows compile time configuration of the RTOS ? |
I would say it makes sense to have the sizes configurable for timer and idle thread stacks. Eg translate the obscure config defines to the system names here https://github.com/ARMmbed/mbed-os/blob/master/rtos/TARGET_CORTEX/mbed_rtx_conf.h#L37. And mbed_app.json would be the right place. @saedelman would you be able to create PR for that? |
We added some defines to add names to idle and timer threads, see aa7a332. |
@JonatanAntoni Thank you. @bulislaw Agreed. If the RTOS allows me to define my own idle function (e.g. Thread::attach_idle_hook()) then I should be able to define the stack for it by overriding OS_IDLE_THREAD_STACK_SIZE, or it will most certainly lead to an overflow. I'm happy to create a PR, can you clarify how I do that? Not familiar. |
@saedelman Hava a look how main thread stack is configured here: https://github.com/ARMmbed/mbed-os/blob/master/rtos/TARGET_CORTEX/mbed_rtx_conf.h#L31 it'll be the same for the other stacks. |
The hard coded |
ARM Internal Ref: MBOTRIAGE-294 |
This issue should be now resolved. I'll close it |
Description
Bug
The iOS_IDLE_THREAD_STACK_SIZE define is hard coded for Nordic targets in:
mbed-os/targets/TARGET_NORDIC/mbed_rtx.h
This should be wrapped in #ifndef/#endif otherwise the user defined setting in mbed_app.json is ignored.
Target
NRF52_DK
Toolchain:
GCC_ARM
mbed-cli version:
1.1.1
Enhancement
It would be nice if the idle thread and timer threads were named so that they are easily identified when dumping threads stats (using mbed-memory-status for example).
The text was updated successfully, but these errors were encountered: