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

Lack of handling of "requires" in mbed_app.json #127

Closed
1 of 2 tasks
LDong-Arm opened this issue Nov 26, 2020 · 1 comment · Fixed by #158
Closed
1 of 2 tasks

Lack of handling of "requires" in mbed_app.json #127

LDong-Arm opened this issue Nov 26, 2020 · 1 comment · Fixed by #158

Comments

@LDong-Arm
Copy link
Contributor

LDong-Arm commented Nov 26, 2020

Description

The Mbed configuration system has a "requires" field (see example) to restrict compilation to certain libraries instead of the whole Mbed OS. This also affects what macros get defined, i.e. macros are only generated from mbed_lib.json of libraries we build.

The current version of mbed-tools defines macros from all libraries, regardless of "defines". This causes issues (see discussion in ARMmbed/mbed-os#13934) when we need to define a macro only when the library is enabled.

Note: If this issue is resolved, we should not need #78 anymore. But there's a more fundamental issue: the "requires": [...] field duplicates the purpose CMake dependency lists:

target_link_libraries(${APP_TARGET}
    PRIVATE
        mbed-os
        mbed-netsocket
)

Such duplication means users would list dependencies twice, once for CMake, once in "requires". How could we handle this?

Issue request type

  • Enhancement
  • Bug
@LDong-Arm
Copy link
Contributor Author

@Patater @hugueskamba

@Patater Patater added this to To do in Mbed Tools Manual Dec 1, 2020
@Patater Patater added this to To do in Mbed Tools Dec 1, 2020
@urutva urutva self-assigned this Dec 10, 2020
@urutva urutva moved this from To do (8) to In progress (5) in Mbed Tools Dec 15, 2020
Mbed Tools automation moved this from In progress (5) to Done Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants