Added external printf module.

Don't use stdio.h, but use instead:

    #include "external/printf/printf.h"
This commit is contained in:
Dual Tachyon 2023-08-14 12:00:08 +01:00
parent 6ea81f0029
commit 6786715e03
4 changed files with 9 additions and 0 deletions

3
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule "external/CMSIS_5"]
path = external/CMSIS_5
url = https://github.com/ARM-software/CMSIS_5
[submodule "external/printf"]
path = external/printf
url = https://github.com/mpaland/printf

View File

@ -14,6 +14,7 @@ OBJS += init.o
OBJS += overlay.o
OBJS += $(LINK_OVERLAY).o
OBJS += $(BLOB_OVERLAY).o
OBJS += external/printf/printf.o
# Drivers
OBJS += driver/adc.o
@ -60,6 +61,7 @@ SIZE = arm-none-eabi-size
ASFLAGS = -mcpu=cortex-m0
CFLAGS = -O2 -Wall -Werror -mcpu=cortex-m0 -fno-builtin -MMD
CFLAGS += -DPRINTF_INCLUDE_CONFIG_H
LDFLAGS = -mcpu=cortex-m0 -nostartfiles -Wl,-T,firmware.ld
OVERLAY_CFLAGS = $(CFLAGS) -fno-inline -fno-toplevel-reorder

1
external/printf vendored Submodule

@ -0,0 +1 @@
Subproject commit d3b984684bb8a8bdc48cc7a1abecb93ce59bbe3e

3
printf_config.h Normal file
View File

@ -0,0 +1,3 @@
#define PRINTF_DISABLE_SUPPORT_LONG_LONG
#define PRINTF_DISABLE_SUPPORT_EXPONENTIAL
#define PRINTF_DISABLE_SUPPORT_PTRDIFF_T