summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2020-02-29 22:45:21 +0000
committerDrashna Jael're <drashna@live.com>2020-03-26 00:42:14 -0700
commit4f5daf452861f4c42d60fa8eb49bd8db0a7e29fa (patch)
tree4a713a7f8ff7bb3e0ae78a8043e4af94b6456c2d
parentf713abefb9408a3243003604b6536537042c592a (diff)
Unconditionally enable ChibiOS syscalls (#8268)
* Enable syscalls all the time * fix whitespace
-rw-r--r--tmk_core/chibios.mk7
-rw-r--r--tmk_core/common.mk14
2 files changed, 6 insertions, 15 deletions
diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk
index f9e52aed23..fcc5de183d 100644
--- a/tmk_core/chibios.mk
+++ b/tmk_core/chibios.mk
@@ -122,9 +122,10 @@ CHIBISRC = $(STARTUPSRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
$(STREAMSSRC) \
- $(STARTUPASM) \
- $(PORTASM) \
- $(OSALASM)
+ $(CHIBIOS)/os/various/syscalls.c
+
+# Ensure the ASM files are not subjected to LTO -- it'll strip out interrupt handlers otherwise.
+QUANTUM_LIB_SRC += $(STARTUPASM) $(PORTASM) $(OSALASM)
CHIBISRC := $(patsubst $(TOP_DIR)/%,%,$(CHIBISRC))
diff --git a/tmk_core/common.mk b/tmk_core/common.mk
index 74fe312831..278a6b6a14 100644
--- a/tmk_core/common.mk
+++ b/tmk_core/common.mk
@@ -27,22 +27,12 @@ TMK_COMMON_SRC += $(COMMON_DIR)/host.c \
ifeq ($(PLATFORM),AVR)
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/xprintf.S
-endif
-
-ifeq ($(PLATFORM),CHIBIOS)
+else ifeq ($(PLATFORM),CHIBIOS)
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c
- ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
- TMK_COMMON_SRC += $(CHIBIOS)/os/various/syscalls.c
- else ifeq ($(strip $(TERMINAL_ENABLE)), yes)
- TMK_COMMON_SRC += $(CHIBIOS)/os/various/syscalls.c
- endif
-endif
-
-ifeq ($(PLATFORM),ARM_ATSAM)
+else ifeq ($(PLATFORM),ARM_ATSAM)
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c
endif
-
# Option modules
BOOTMAGIC_ENABLE ?= no
VALID_MAGIC_TYPES := yes full lite