cpu/stm32_common: fix source selection declared as module dependencies (broken) #10153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
This fixes the handling of
periph_flashpage
forstm32_common
. If a module would have requiredperiph_flashpage
it would not have worked and if an application would have said declared an optional feature it would not have worked either.The does not fix the global handling of CPU dependencies but replaces using modules/periphs to declare module internal only selection of source files to only source file inclusion.
The fact that they are described as
module
is never used in the code.This also fixes the
i2c
handling the same way.More description in the commit messages.
Testing procedure
Not used that they are declared as modules:
There is no output for
Flashpage handling
Flashpage uses
flash_common
This does not break master handling for
periph_flashpage
:Both with master and this PR,
flash_common
is usedHandling dependency in
Makefile.dep
With this diff applied, as if a module depended on it in
Makefile.dep
, it now works with this PR.Compiling in
examples/hello-world
with the same test command it succeeds with this PR.With master we get
ERROR_no_flash_common
Flashpage works with FEATURES_OPTIONAL
With this PR, it also works with
FEATURES_OPTIONAL += periph_flashpage
in an application:With master we get
ERROR_no_flash_common
eeprom handling
The same tests can be run by using
periph_eeprom
feature, BOARDb-l072z-lrwan1
andtests/periph_eeprom
.i2c handling
The same
i2c
implementation is still used with this PR as with master.Issues/PRs references
Previous attempt to fix it:
#9892
#9913 (by fixing dependency handling globally)
#10146
Required for PRs
#9969
#8774