Skip to content

allow sharing static libraries (esp. mbed-os) among multiple projects #580

@bmcdonnell-ionx

Description

@bmcdonnell-ionx

This is a feature(s) request, originally discussed here: How can I factor mbed-os out of my (offline) project?.

Currently, AFAIK, there is no way to use a single copy of a static library from multiple projects. I think it would be quite useful to be able to do this both entirely within mbed-cli, and also in exported projects (using offline IDEs). I think it would be especially useful to have mbed-os as a static library or libraries, which are also buildable as an exported static library project(s).

Suppose I have executable ProjectBar, which links to static library LibFoo (which could be mbed-os-lib). I'm requesting these features:

  1. Ability to link to LibFoo within ProjectBar, while LibFoo resides outside the ProjectBar sourcetree. (i.e. Link to the already-built library and header files.)
    • mbed-cli compile links in LibFoo.
    • Can use relative and/or absolute paths.
  2. Ability to export LibFoo to offline IDEs as a static library project.
  3. When exporting ProjectBar to an offline IDE, maintain references to LibFoo in the project/linker files.
  4. Ability to "step into" LibFoo source when debugging ProjectBar.

Of course, the last one is lowest priority relative to the others - kind of a "nice to have".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions