-
Notifications
You must be signed in to change notification settings - Fork 3k
Put system to sleep when going idle #3566
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
I don't think that will give us much power savings, due to systick set to 1ms by default for RTX. On the other hand it shouldn't cause us any issues so might be worth doing anyway (on top of which we can build a tickless solution). We should actually measure that so we have some hard points rather than 'I think'. |
/morph test |
Any idea why continuous-integration/jenkins/pr-head fails. On my side the link fails to open with a timeout. |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Just restarted. Reason was not able to allocate resources. |
We have performed a little test on a
Compiling this program with |
I just thought that the test run didn't test much as we don't run it with NDEBUG, we use the default profile. @bridadan is there a way of triggering a NDEBUG run? |
Well, I think compiling with |
And using option |
Sure, but I want to run the tests on CI with that option so we can see how other platforms behave. |
What about the |
Just in order to underline that in contrast to #3019 I added both |
Could you submit temporary change, like that: diff --git a/tools/profiles/default.json b/tools/profiles/default.json
index d4755e9..1854374 100644
--- a/tools/profiles/default.json
+++ b/tools/profiles/default.json
@@ -5,7 +5,7 @@
"-fmessage-length=0", "-fno-exceptions", "-fno-builtin",
"-ffunction-sections", "-fdata-sections", "-funsigned-char",
"-MMD", "-fno-delete-null-pointer-checks",
- "-fomit-frame-pointer", "-Os"],
+ "-fomit-frame-pointer", "-Os", "-DNDEBUG"],
"asm": ["-x", "assembler-with-cpp"],
"c": ["-std=gnu99"],
"cxx": ["-std=gnu++98", "-fno-rtti", "-Wvla"],
@@ -14,19 +14,19 @@
"-Wl,--wrap,_calloc_r", "-Wl,--wrap,exit", "-Wl,--wrap,atexit"]
},
"ARM": {
- "common": ["-c", "--gnu", "-Otime", "--split_sections",
+ "common": ["-c", "--gnu", "-Ospace", "--split_sections",
"--apcs=interwork", "--brief_diagnostics", "--restrict",
- "--multibyte_chars", "-O3"],
+ "--multibyte_chars", "-O3", "-DNDEBUG"],
"asm": [],
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
"ld": []
},
"uARM": {
- "common": ["-c", "--gnu", "-Otime", "--split_sections",
+ "common": ["-c", "--gnu", "-Ospace", "--split_sections",
"--apcs=interwork", "--brief_diagnostics", "--restrict",
"--multibyte_chars", "-O3", "-D__MICROLIB",
- "--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD"],
+ "--library_type=microlib", "-DMBED_RTOS_SINGLE_THREAD", "-DNDEBUG"],
"asm": [],
"c": ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
"cxx": ["--cpp", "--no_rtti", "--no_vla"],
@@ -35,7 +35,7 @@
"IAR": {
"common": [
"--no_wrap_diagnostics", "-e",
- "--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-Oh"],
+ "--diag_suppress=Pa050,Pa084,Pa093,Pa082", "-Ohz", "-DNDEBUG"],
"asm": [],
"c": ["--vla"],
"cxx": ["--guard_calls", "--no_static_destruction"], Which works around our CIs issues and would use the small profile instead of default one. We could kick off the run and revert the change after. That should give us some more information on how it works across multiple targets. |
Done! |
Thanks! /morph test-nightly |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Will do it tomorrow morning! |
retest uvisor |
Maintainers: I'd like @sg- and/or @0xc0170 to review this first before this comes in. Also, as a developer, I would be surprised to see my device going to sleep just by enabling If we are set on enabling this with I think it might be more fitting to make this a config setting. |
Sure documenting would be great, any ideas what would be the right place to do it? Also the uvisor tests need to be rerun, when we revert the change to build with 'small' profile. I'll put a 'do not merge' label so that happens before merging. |
I'd suggest placing it in the build profiles documentation: https://github.com/ARMmbed/mbed-os/blob/master/docs/build_profiles.md#small-profile |
Reverted PR back, i.e. CIs use default profile again. |
You can find a proposal for a change in documentation here. |
resolves #2769 |
Requires PR #3607!!! |
retest uvisor |
@mazimkhan it seems I don't have the runes to do the |
retest uvisor |
Ciao Martin (@0xc0170), could you pls. proceed on & merge this PR too, or are there still some blocking points I am not aware of? |
I removed the labels: 'do not merge' as i added it before and it does not apply anymore and 'needs review' as it was reviewed. |
/morph test-nightly |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Description
While waiting for tickless mode being implemented & stable, put system to sleep when going idle.
Status
READY
Migrations
NO
Related PRs
#3607
#3602
#3693