Add lightweight printf support
For now, printf() isn't hooked up to anything, but snprintf() can be used to create a string to pass off to usart.tx_blocking().
This commit is contained in:
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "firmware/ThirdParty/printf"]
|
||||||
|
path = firmware/ThirdParty/printf
|
||||||
|
url = https://github.com/mpaland/printf.git
|
||||||
@@ -69,7 +69,7 @@ endif
|
|||||||
|
|
||||||
# Ignores dotfiles and other garbage some tools leave behind
|
# Ignores dotfiles and other garbage some tools leave behind
|
||||||
define find_important
|
define find_important
|
||||||
$(shell find $(1) -type f -and -name $(2) -and -not -iname "*~" -and -not -iname "*#*" -and -not \( -path "*.cquery_cached_index*" \) -and -not \( -path "*build*" \) )
|
$(shell find $(1) -type f -and -name $(2) -and -not -iname "*~" -and -not -iname "*#*" -and -not \( -path "*.cquery_cached_index*" \) -and -not \( -path "*build*" \) -and -not \( -path "*ThirdParty/printf/test/*" \) )
|
||||||
endef
|
endef
|
||||||
|
|
||||||
FONTS := small large_digits
|
FONTS := small large_digits
|
||||||
@@ -118,10 +118,14 @@ CFLAGS += -ffreestanding
|
|||||||
CFLAGS += -fstack-usage -Wstack-usage=128
|
CFLAGS += -fstack-usage -Wstack-usage=128
|
||||||
# Defines
|
# Defines
|
||||||
CFLAGS += -D$(DEVICE_FAMILY_DEFINE) -D$(DEVICE_TYPE_DEFINE) -D$(DEVICE_LINE_DEFINE)
|
CFLAGS += -D$(DEVICE_FAMILY_DEFINE) -D$(DEVICE_TYPE_DEFINE) -D$(DEVICE_LINE_DEFINE)
|
||||||
|
CFLAGS += -DPRINTF_DISABLE_SUPPORT_FLOAT -DPRINTF_DISABLE_SUPPORT_EXPONENTIAL -DPRINTF_DISABLE_SUPPORT_PTRDIFF_T
|
||||||
|
# Consider this one if we are running short on flash, it saved about 1K
|
||||||
|
#CFLAGS += -DPRINTF_DISABLE_SUPPORT_LONG_LONG
|
||||||
# Includes
|
# Includes
|
||||||
CFLAGS += -I./Bsp/Mcu/
|
CFLAGS += -I./Bsp/Mcu/
|
||||||
CFLAGS += -I./ThirdParty/stm32/$(DEVICE_LINE)/Include
|
CFLAGS += -I./ThirdParty/stm32/$(DEVICE_LINE)/Include
|
||||||
CFLAGS += -I./ThirdParty/CMSIS/Core/Include
|
CFLAGS += -I./ThirdParty/CMSIS/Core/Include
|
||||||
|
CFLAGS += -I./ThirdParty/printf
|
||||||
CFLAGS += -I./build/gen/
|
CFLAGS += -I./build/gen/
|
||||||
CFLAGS += -I.
|
CFLAGS += -I.
|
||||||
|
|
||||||
|
|||||||
1
firmware/ThirdParty/printf
vendored
Submodule
1
firmware/ThirdParty/printf
vendored
Submodule
Submodule firmware/ThirdParty/printf added at d3b984684b
Reference in New Issue
Block a user