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

Refactor platform logic within print.h #11863

Merged
merged 9 commits into from
Feb 14, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove platform logic from common.mk
  • Loading branch information
zvecr committed Feb 11, 2021
commit dbfd3391213abc13f58601194015e0b05d0d73a5
8 changes: 3 additions & 5 deletions tmk_core/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,15 @@ TMK_COMMON_SRC += $(COMMON_DIR)/host.c \
$(COMMON_DIR)/sync_timer.c \
$(PLATFORM_COMMON_DIR)/bootloader.c \

ifeq ($(PLATFORM),AVR)
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/xprintf.S
else ifeq ($(PLATFORM),CHIBIOS)
ifneq ("$(wildcard $(TMK_PATH)/$(PLATFORM_COMMON_DIR)/printf.mk)","")
include $(TMK_PATH)/$(PLATFORM_COMMON_DIR)/printf.mk
else
TMK_COMMON_SRC += $(PRINTF_PATH)/printf.c
TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_FLOAT
TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_EXPONENTIAL
TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_LONG_LONG
TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_PTRDIFF_T
VPATH += $(PRINTF_PATH)
else ifeq ($(PLATFORM),ARM_ATSAM)
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c
endif

# Option modules
Expand Down
1 change: 1 addition & 0 deletions tmk_core/common/arm_atsam/printf.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c
2 changes: 2 additions & 0 deletions tmk_core/common/avr/printf.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/xprintf.S
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c