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

Add conditional compilation flags to reduce compiled binary size. #111

Open
SFE-Brudnerd opened this issue Aug 14, 2023 · 0 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@SFE-Brudnerd
Copy link
Member

Problem Statement

Currently, this framework is all or nothing, which can bloat the binary. While this is acceptable for the datalogger product it's currently used in, it makes it difficult to utilize this in future products that may not want to use all the sensors, only some of them.

Proposed Solution

Using some sort of conditional compilation. 2 ideas come to mind to me.

  1. #ifdef guarding inside the device libraries with a configuration file in your application including the appropriate devices. This could take the form of #ifdef (FLX_DEV_ALL || FLX_DEV_ABC123) so there's still an include all option.
  2. Using CMake. I'm not sure how this would work in the context of arduino applications, but arduino cores use it. Would require further thought.
@SFE-Brudnerd SFE-Brudnerd added enhancement New feature or request help wanted Extra attention is needed labels Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant