Skip to content

Replace macros with config options #8106

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 1 commit into from
Sep 22, 2018
Merged

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Sep 12, 2018

Description

Add a config option for the following values:

  • MBED_SYS_STATS_ENABLED
  • MBED_STACK_STATS_ENABLED
  • MBED_CPU_STATS_ENABLED
  • MBED_HEAP_STATS_ENABLED
  • MBED_THREAD_STATS_ENABLED
  • MBED_CONF_APP_MAIN_STACK_SIZE
  • MBED_CONF_APP_TIMER_THREAD_STACK_SIZE
  • MBED_CONF_APP_IDLE_THREAD_STACK_SIZE
  • MBED_CONF_APP_THREAD_STACK_SIZE

To maintain backwards compatibility inside the RTOS both APP and RTOS config values can be used.

Pull request type

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

Add a config option for the following values:
MBED_SYS_STATS_ENABLED
MBED_STACK_STATS_ENABLED
MBED_CPU_STATS_ENABLED
MBED_HEAP_STATS_ENABLED
MBED_THREAD_STATS_ENABLED
MBED_CONF_APP_MAIN_STACK_SIZE
MBED_CONF_APP_TIMER_THREAD_STACK_SIZE
MBED_CONF_APP_IDLE_THREAD_STACK_SIZE
MBED_CONF_APP_THREAD_STACK_SIZE

To maintain backwards compatibility inside the RTOS both
APP and RTOS config values can be used.
Copy link
Contributor

@kegilbert kegilbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, LGTM!

@@ -70,6 +70,31 @@
"help": "Enable tracing of each memory call by invoking a callback on each memory operation. See mbed_mem_trace.h in the HAL API for more information",
"value": false
},
"sys-stats-enabled": {
"macro_name": "MBED_SYS_STATS_ENABLED",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting this as macro name will set the macro? Wow I didn't knew we can actually rename long MBED_CONF parameters using this..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's super helpful but not a really well known feature.

@deepikabhavnani
Copy link

Code changes look good but we should be updating documents and all examples 'mbed-os-example-xxx' to use new parameter

@kegilbert
Copy link
Contributor

@deepikabhavnani I can get on that early next week if Russ doesn't beat me to it.

@c1728p9
Copy link
Contributor Author

c1728p9 commented Sep 17, 2018

Example updates will need to wait until this change is in a release. @cmonr can this PR go in the next patch release?

@c1728p9
Copy link
Contributor Author

c1728p9 commented Sep 17, 2018

Examples which should be updated once this is in a release:

  1. https://github.com/ARMmbed/mbed-os-example-cpu-stats
  2. https://github.com/ARMmbed/mbed-os-example-cpu-usage
  3. https://github.com/ARMmbed/mbed-os-example-thread-statistics
  4. https://github.com/ARMmbed/mbed-os-example-sys-info

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like it having it in the config and backward compatible

@cmonr
Copy link
Contributor

cmonr commented Sep 22, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Sep 22, 2018

Build : SUCCESS

Build number : 3123
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/8106/

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Sep 22, 2018

@mbed-ci
Copy link

mbed-ci commented Sep 22, 2018

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