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

[Core] Allow usage of AVRs minimal printf library #16266

Merged
merged 1 commit into from
Apr 22, 2022

Conversation

KarlK90
Copy link
Member

@KarlK90 KarlK90 commented Feb 7, 2022

Description

Introduce new AVR specific make variable AVR_USE_MINIMAL_PRINTF which includes AVR's libc minimal printf implementation. It has less features and thus can shave ~400 bytes.

Usually we use the xprintf implementation but keyboards that use s(n)printf automatically pull in the normal AVR libc implementation, which is ~900 bytes heavy.

Size impact: -390 Bytes

./util/size_regression.sh -d feature/avr_minimal_printf crkbd/rev1:default
Size:    26564, delta:   -390 -- 03900d6e53 Enable for crkbd (not actually in PR)
Size:    26954, delta:     +0 -- 3eb1f765a1 [Core] Allow usage of AVR minimal printf library

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@KarlK90 KarlK90 changed the base branch from master to develop February 7, 2022 20:48
@github-actions github-actions bot added core documentation keyboard keymap python via Adds via keymap and/or updates keyboard for via support labels Feb 7, 2022
@github-actions github-actions bot removed python keymap via Adds via keymap and/or updates keyboard for via support keyboard labels Feb 7, 2022
@drashna drashna requested a review from a team February 7, 2022 21:50
platforms/avr/platform.mk Outdated Show resolved Hide resolved
@KarlK90 KarlK90 force-pushed the feature/avr_minimal_printf branch 3 times, most recently from e9eb90f to b110029 Compare February 8, 2022 10:52
Enable linking of AVR's libc minimal printf implementation which
can shave ~400 bytes. Usually we use the xprintf implementation
but keyboards that use s(n)printf automatically pull in the AVR
libc implementation, which is ~900 bytes heavy.

Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
@drashna drashna requested a review from a team February 27, 2022 08:43
@stale
Copy link

stale bot commented Apr 16, 2022

Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

@tzarc tzarc merged commit b1681fb into qmk:develop Apr 22, 2022
0xcharly pushed a commit to Bastardkb/bastardkb-qmk that referenced this pull request Jul 4, 2022
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants