Skip to content
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

boards: move remaining uses of USEMODULE from Makefile.include to Makefile.dep #13291

Merged
merged 1 commit into from
Feb 7, 2020

Conversation

aabadie
Copy link
Contributor

@aabadie aabadie commented Feb 5, 2020

Contribution description

This PR moves all remaining uses of USEMODULE += <module> from boards Makefile.include to the corresponding Makefile.dep.

Testing procedure

  • A green Murdock
  • for each modified board, check the list of modules included in a build and compare to master

Issues/PRs references

#9913

@aabadie aabadie added Area: build system Area: Build system Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: boards Area: Board ports labels Feb 5, 2020
@aabadie aabadie requested a review from fjmolinas February 5, 2020 06:40
@aabadie aabadie changed the title boards: move remaing uses of USEMODULE from Makefile.include to Makefile.dep boards: move remaining uses of USEMODULE from Makefile.include to Makefile.dep Feb 5, 2020
@@ -1,5 +1,3 @@
USEMODULE += boards_common_arduino-atmega
Copy link
Member

Choose a reason for hiding this comment

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

did this one got lost? or did I overlooked it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no idea, did you change this recently ?

@gschorcht
Copy link
Contributor

  • for each modified board, check the list of modules included in a build and compare to master

IMHO, we should use again dist/tools/buildsystem_sanity_check/save_all_dependencies_resolution_variables.sh. I will try it later today.

@aabadie
Copy link
Contributor Author

aabadie commented Feb 5, 2020

Wait a bit @gschorcht, Murdock is reporting a lot of failures. I'd like to fix them first.

@gschorcht
Copy link
Contributor

gschorcht commented Feb 5, 2020

@aabadie I have the script already running, but for current master first. This will be needed anyway.

@gschorcht
Copy link
Contributor

Wait a bit @gschorcht, Murdock is reporting a lot of failures. I'd like to fix them first.

As I have seen only for 4 boards acd52832, ruuvitag, wsn430-v1_3b, wsn430-v1_4 and for only one test esp32-olimex-evb.

@aabadie
Copy link
Contributor Author

aabadie commented Feb 5, 2020

@gschorcht, I pushed a fix that I hope should improve the situation.

@gschorcht
Copy link
Contributor

@gschorcht, I pushed a fix that I hope should improve the situation.

I will take a look to the problem with the esp32-olimex-evb board.

@gschorcht
Copy link
Contributor

gschorcht commented Feb 5, 2020

@aabadie I figured out a problem for all ESP32 boards in board.h headers where board_common.h was included inside the extern "C" linkage block. Even though PR #13301 fixes the problem, the reason the compilation error occurred with this PR and not in the master is a wrong module:

The esp32-olimex-32 has an Ethernet interface which should be used default netdev. That's why module esp_eth is enabled if the netdev_default module is defined. However, depending on this module, some compile options must be set in Makefile.include.

And here we encounter the problem of the order in which Makefile.include and Makefile.dep are read. It must be known in Makefile.include whether esp_eth, esp_wifi or esp_now are used in order to set some compile options correctly. However, the dependencies in Makefile.dep are read after Makefile.include has been read. Therefore, all dependencies for these modules must be kept in Makefile.include for the moment until we change this order.

Maybe we could solve this problem using FEATURES_OPTIONAL and FEATURES_PROVIDED.

@aabadie
Copy link
Contributor Author

aabadie commented Feb 6, 2020

@gschorcht, I'll remove the changes related to the esp32 board for the moment.

I agree that having features for esp_eth, esp_wifi, esp_now could help with the dependency resolution.

@aabadie aabadie force-pushed the pr/boards/makefile_dep branch from bf0f15c to 0e9c7a5 Compare February 6, 2020 15:22
@aabadie
Copy link
Contributor Author

aabadie commented Feb 6, 2020

No more build failures on Murdock, OK to squash @gschorcht ?

@gschorcht
Copy link
Contributor

Should we first have the results of dist/tools/buildsystem_sanity_check/save_all_dependencies_resolution_variables.sh?

@aabadie
Copy link
Contributor Author

aabadie commented Feb 6, 2020

Should we first have the results of dist/tools/buildsystem_sanity_check/save_all_dependencies_resolution_variables.sh?

That would help indeed. Let's wait for the results.

@gschorcht
Copy link
Contributor

gschorcht commented Feb 7, 2020

I ran dist/tools/buildsystem_sanity_check/save_all_dependencies_resolution_variables.sh for this PR and the current master. The output generated with

BOARD="${board}" make -C "${RIOTBASE}/${application}" dependency-debug

is completely identical. However the output from

DEPENDENCY_DEBUG=1 make -C "${RIOTBASE}/${application}" info-boards-supported

differs slightly. But the only difference is that the list of used module in USEMODULE contains an additional entry boards_common_* with this PR for the boards that use a common board definition, for example boards_common_nucleo for nucleo-* boards.

Without having a deep look why the USEMODULE list for info-boards-supported differs, it seems that the dependencies per application and board are exactly the same. Furthermore, it contains only an additional entry for boards_common_* which seems to be correct. Therefore, I would say that everything is fine.

@gschorcht
Copy link
Contributor

@aabadie Please squash.

@aabadie aabadie force-pushed the pr/boards/makefile_dep branch from 0e9c7a5 to 713fead Compare February 7, 2020 12:21
@aabadie
Copy link
Contributor Author

aabadie commented Feb 7, 2020

Done

@aabadie
Copy link
Contributor Author

aabadie commented Feb 7, 2020

It's all green @gschorcht !

Copy link
Contributor

@gschorcht gschorcht left a comment

Choose a reason for hiding this comment

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

ACK

@gschorcht gschorcht merged commit c585535 into RIOT-OS:master Feb 7, 2020
@gschorcht
Copy link
Contributor

gschorcht commented Feb 7, 2020

@aabadie Thanks for the contribution.

@leandrolanzieri leandrolanzieri added this to the Release 2020.04 milestone Feb 20, 2020
@aabadie aabadie deleted the pr/boards/makefile_dep branch March 5, 2020 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants