fix: CMake build producing too large binaries#354
Merged
hathach merged 3 commits intoadafruit:masterfrom Jun 30, 2025
Merged
Conversation
This flag is also present in the Makefile and optimises the resulting binary for the size of the binary. Without that flag the flash consumption would be too high to fit inside the allocated space. Signed-off-by: Andreas Kurz <info@akurz.net>
In this repository CMake and Make co-exists. Unfortunately there was no documentation on how to properly use CMake so this is a starting point. Signed-off-by: Andreas Kurz <info@akurz.net>
add CONFIG_GPIO_AS_PINRESET
hathach
approved these changes
Jun 30, 2025
Member
hathach
left a comment
There was a problem hiding this comment.
thank you, I change to use default CMAKE_BUILD_TYPE=MinSizeRel instead of forcing -Os for all build type. Also update doc for make as default generator (which is what most people would do).
Contributor
Author
Ah, thanks :) |
This file contains hidden or 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
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.
Checklist
By completing this PR sufficiently, you help us to review this Pull Request quicker and also help improve the quality of Release Notes
Description of Change
This change will fix build errors with CMake as size optimization is missing and therefore it doesn't compile successfully. Also the documentation is extended to give a hint how to use CMake in this repository at all.