Skip to content

BLE: Features/roles should be disabled by default #14974

Open
@boraozgen

Description

@boraozgen

Description of defect

I noticed that the BLE related code in my application, which only uses the broadcaster/peripheral roles and GATT server feature, was taking up ~300kB of flash in debug build. When I looked into it a bit more, I noticed that many functions which I don't use are linked into the binary. I could reduce the binary size by ~80kB by disabling the features in mbed_app.json. I believe it is a bad default behavior to link all of the unused code. Therefore I suggest disabling all of the features/roles by default and only enabling the required ones in the examples. This way users would build the smallest binary necessary.

Target(s) affected by this defect ?

BLE targets.

Toolchain(s) (name and version) displaying this defect ?

Not related.

What version of Mbed-os are you using (tag or sha) ?

mbed-os-99.99.99

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

Not related.

How is this defect reproduced ?

Design issue.

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