-
Notifications
You must be signed in to change notification settings - Fork 3k
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
CMake: Componentize Mbed OS into multiple CMake targets #13732
Merged
hugueskamba
merged 109 commits into
ARMmbed:feature-cmake
from
0xc0170:feature-cmake-interface-lib
Oct 12, 2020
Merged
CMake: Componentize Mbed OS into multiple CMake targets #13732
hugueskamba
merged 109 commits into
ARMmbed:feature-cmake
from
0xc0170:feature-cmake-interface-lib
Oct 12, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@hugueskamba, thank you for your changes. |
3 tasks
This has 112 commits. Is that correct or does this need rebasing on the latest feature-cmake? |
Anything that is in Mbed OS it is treated as internal. Everything else as external.
Every component invokes set of these function. We should provide default implementation.
+ move components function to components module
Tricky part to use object libraries. If we want them on the right side in target_link, we would need to have no circular deps. Not our case. What I did here is to add object library and add its objects and includes to Mbed OS main lib. This however breaks if for instance cmsis and events would have dependency on each other (we first include cmsis then events). It should not happen but keep in mind, this is where static libs come handy.
This is work in progress. Connectivity and storage contain multiple components. We need to be aware what is in there to be able to add them. Or maybe not, if we switch to STATIC lib for these?
fix some naming in the functionality as well
Co-authored-by: Hugues Kamba <41612201+hugueskamba@users.noreply.github.com>
Remove component targets with board, manufacturer suffixes to simply the user experience. The board specific files are automatically added to the build based on the labels of the mbed targets without using the custom utility function. The utility function was not used as it relies on the previous tools naming convention for including directories. Includes: nfc, 802.15.4_RF, cellular
This was done as some targets are used across different directories. For example mbed-os-mbedtls is used both in connectivity/drivers and connectivity/mbedtls. However, as the target was created in the latter, it was not visible in the former. The creation of the target had therefore to be in a parent directory of both directories. Similar issue as the example above for ble, nfc, etc.
It was made a separate component as it has dependencies on other Mbed OS components. It was not suitable to add dependencies to the mbed-os target and made sense to have it as a separte CMake target.
* Add cellular as a depency. * Add emac as a conditional depency.
Ensure nanostack-libservice is available to mbed-trace when the former is included in the build.
Some applications refer the parent directory to include lorawan header files
40da67b
to
d93c937
Compare
hugueskamba
added a commit
that referenced
this pull request
Oct 12, 2020
Aside from the core mbed-os CMake target, a number of targets have been created so they can optionally be included by application executables that require them using `target_link_libraries()`. Co-authored-by: Martin Kojtal <martin.kojtal@arm.com> Co-authored-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@arm.com>
hugueskamba
added a commit
that referenced
this pull request
Oct 12, 2020
Aside from the core mbed-os CMake target, a number of targets have been created so they can optionally be included by application executables that require them using `target_link_libraries()`. Co-authored-by: Martin Kojtal <martin.kojtal@arm.com> Co-authored-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@arm.com>
💯 it's in! |
hugueskamba
added a commit
that referenced
this pull request
Oct 15, 2020
Aside from the core mbed-os CMake target, a number of targets have been created so they can optionally be included by application executables that require them using `target_link_libraries()`. Co-authored-by: Martin Kojtal <martin.kojtal@arm.com> Co-authored-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@arm.com>
0xc0170
added a commit
that referenced
this pull request
Oct 20, 2020
Aside from the core mbed-os CMake target, a number of targets have been created so they can optionally be included by application executables that require them using `target_link_libraries()`. Co-authored-by: Martin Kojtal <martin.kojtal@arm.com> Co-authored-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@arm.com>
0xc0170
added a commit
that referenced
this pull request
Oct 23, 2020
Aside from the core mbed-os CMake target, a number of targets have been created so they can optionally be included by application executables that require them using `target_link_libraries()`. Co-authored-by: Martin Kojtal <martin.kojtal@arm.com> Co-authored-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@arm.com>
0xc0170
added a commit
that referenced
this pull request
Nov 3, 2020
Aside from the core mbed-os CMake target, a number of targets have been created so they can optionally be included by application executables that require them using `target_link_libraries()`. Co-authored-by: Martin Kojtal <martin.kojtal@arm.com> Co-authored-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@arm.com>
hugueskamba
added a commit
that referenced
this pull request
Nov 6, 2020
Aside from the core mbed-os CMake target, a number of targets have been created so they can optionally be included by application executables that require them using `target_link_libraries()`. Co-authored-by: Martin Kojtal <martin.kojtal@arm.com> Co-authored-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@arm.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary of changes
Aside from the core
mbed-os
CMake target, a number of targets have been created so they can optionally be included by application executables that require them usingtarget_link_libraries
.See an example here: https://github.com/ARMmbed/mbed-os-example-kvstore/pull/55/files
Impact of changes
Requires the following PR: ARMmbed/mbed-tools#78
Migration actions required
The following PRs must also be merged for the Travis CMake CI job to pass:
Documentation
https://github.com/0xc0170/mbed-os/blob/40da67beba045d6a18a5b2c6d80f390a47b17c3b/docs/design-documents/tools/cmake_components.md
Pull request type
Test results
Reviewers