-
Notifications
You must be signed in to change notification settings - Fork 2k
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
pm: fix pm configuration #7308
pm: fix pm configuration #7308
Conversation
b7bb9ae
to
b6b1aed
Compare
b6b1aed
to
2f97cf3
Compare
seems to me that this PR is defeating its purpose, those functions are defined weak as to actually be overridden by other implementation if present... Could you elaborate a little more on you actual problem? |
While working on #7351 I saw that it was not working, but I don't know why. |
Actually, this is the same as #6709 |
@haukepetersen, yeah the problem is that it does not work as expected. The fundamental solution would be making this function overridden. But for now, using #ifdef seems to be the simplest way of getting around this problem, at least temporarily. |
While working on Kinetis pm I noticed that adding USEMODULE += pm_layered has no effect unless pm_block/pm_unblock is used at least once in the drivers (periph). The linker doesn't discard the weak pm_set_lowest unless there is something else required from the file containing the strong pm_set_lowest. |
The strong symbol is also used is the object file (.a) of pm_layered is linked before periph_common. But our current build system pass them alphabetically, so periph_common is used before pm_layered. |
So, is there any problem if this PR is applied? |
@haukepetersen, @kaspar030, any feedback? |
This fix is included in #7241. |
@kaspar030, Cool, waiting for your job finished! |
This will be superseded by #7597 |
Closed in favor of #7726. |
This PR fixes PM configuration.
PM functions in periph_common should not be executed if FEATURE_PERIPH_PM is used. PM_LAYERED will be used instead.