[Core] Allow usage of AVRs minimal printf library (#16266)
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
This commit is contained in:
parent
68a3fe8347
commit
b1681fb6a1
2 changed files with 22 additions and 0 deletions
|
@ -37,6 +37,15 @@ CXXFLAGS += -fno-exceptions -std=c++11
|
|||
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
# Use AVR's libc minimal printf implementation which 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 AVR libc implementation, which is ~900 bytes heavy.
|
||||
AVR_USE_MINIMAL_PRINTF ?= no
|
||||
ifeq ($(strip $(AVR_USE_MINIMAL_PRINTF)), yes)
|
||||
LDFLAGS += -Wl,--whole-archive -lprintf_min -Wl,--no-whole-archive
|
||||
endif
|
||||
|
||||
OPT_DEFS += -DF_CPU=$(F_CPU)UL
|
||||
|
||||
MCUFLAGS = -mmcu=$(MCU)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue