Initial arm->chibios pass - simplify some platform logic (#8450)
parent
7e80686f1e
commit
d96380e654
|
@ -231,13 +231,16 @@ endif
|
|||
# We can assume a ChibiOS target When MCU_FAMILY is defined since it's
|
||||
# not used for LUFA
|
||||
ifdef MCU_FAMILY
|
||||
FIRMWARE_FORMAT?=bin
|
||||
PLATFORM=CHIBIOS
|
||||
PLATFORM_KEY=chibios
|
||||
FIRMWARE_FORMAT?=bin
|
||||
else ifdef ARM_ATSAM
|
||||
PLATFORM=ARM_ATSAM
|
||||
PLATFORM_KEY=arm_atsam
|
||||
FIRMWARE_FORMAT=bin
|
||||
else
|
||||
PLATFORM=AVR
|
||||
PLATFORM_KEY=avr
|
||||
FIRMWARE_FORMAT?=hex
|
||||
endif
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ all: elf
|
|||
|
||||
VPATH += $(COMMON_VPATH)
|
||||
PLATFORM:=TEST
|
||||
PLATFORM_KEY:=test
|
||||
|
||||
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
||||
include tests/$(TEST)/rules.mk
|
||||
|
|
|
@ -35,11 +35,7 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
|||
MUSIC_ENABLE := 1
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c
|
||||
ifeq ($(PLATFORM),AVR)
|
||||
SRC += $(QUANTUM_DIR)/audio/audio.c
|
||||
else
|
||||
SRC += $(QUANTUM_DIR)/audio/audio_arm.c
|
||||
endif
|
||||
SRC += $(QUANTUM_DIR)/audio/audio_$(PLATFORM_KEY).c
|
||||
SRC += $(QUANTUM_DIR)/audio/voices.c
|
||||
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||
endif
|
||||
|
@ -315,11 +311,7 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
|||
else
|
||||
SRC += $(QUANTUM_DIR)/backlight/backlight_driver_common.c
|
||||
ifeq ($(strip $(BACKLIGHT_DRIVER)), pwm)
|
||||
ifeq ($(PLATFORM),AVR)
|
||||
SRC += $(QUANTUM_DIR)/backlight/backlight_avr.c
|
||||
else
|
||||
SRC += $(QUANTUM_DIR)/backlight/backlight_arm.c
|
||||
endif
|
||||
SRC += $(QUANTUM_DIR)/backlight/backlight_$(PLATFORM_KEY).c
|
||||
else
|
||||
SRC += $(QUANTUM_DIR)/backlight/backlight_$(strip $(BACKLIGHT_DRIVER)).c
|
||||
endif
|
||||
|
|
|
@ -30,4 +30,4 @@ SRC = keyboards/wilba_tech/wt_main.c \
|
|||
keyboards/wilba_tech/wt_rgb_backlight.c \
|
||||
drivers/issi/is31fl3733.c \
|
||||
quantum/color.c \
|
||||
drivers/arm/i2c_master.c
|
||||
drivers/chibios/i2c_master.c
|
||||
|
|
|
@ -28,4 +28,4 @@ SRC = keyboards/wilba_tech/wt_main.c \
|
|||
keyboards/wilba_tech/wt_rgb_backlight.c \
|
||||
drivers/issi/is31fl3733.c \
|
||||
quantum/color.c \
|
||||
drivers/arm/i2c_master.c
|
||||
drivers/chibios/i2c_master.c
|
||||
|
|
|
@ -30,4 +30,4 @@ SRC = keyboards/wilba_tech/wt_main.c \
|
|||
keyboards/wilba_tech/wt_rgb_backlight.c \
|
||||
drivers/issi/is31fl3733.c \
|
||||
quantum/color.c \
|
||||
drivers/arm/i2c_master.c
|
||||
drivers/chibios/i2c_master.c
|
||||
|
|
|
@ -30,4 +30,4 @@ SRC = keyboards/wilba_tech/wt_main.c \
|
|||
keyboards/wilba_tech/wt_rgb_backlight.c \
|
||||
drivers/issi/is31fl3733.c \
|
||||
quantum/color.c \
|
||||
drivers/arm/i2c_master.c
|
||||
drivers/chibios/i2c_master.c
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#else
|
||||
#include "ch.h"
|
||||
#include "hal.h"
|
||||
#include "drivers/arm/i2c_master.h"
|
||||
#include "drivers/chibios/i2c_master.h"
|
||||
#endif
|
||||
|
||||
#if defined(RGB_BACKLIGHT_DAWN60)
|
||||
|
|
|
@ -179,7 +179,7 @@ HEX = $(OBJCOPY) -O $(FORMAT)
|
|||
EEP =
|
||||
BIN = $(OBJCOPY) -O binary
|
||||
|
||||
COMMON_VPATH += $(DRIVER_PATH)/arm
|
||||
COMMON_VPATH += $(DRIVER_PATH)/chibios
|
||||
|
||||
THUMBFLAGS = -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB
|
||||
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
COMMON_DIR = common
|
||||
ifeq ($(PLATFORM),AVR)
|
||||
PLATFORM_COMMON_DIR = $(COMMON_DIR)/avr
|
||||
else ifeq ($(PLATFORM),CHIBIOS)
|
||||
PLATFORM_COMMON_DIR = $(COMMON_DIR)/chibios
|
||||
else ifeq ($(PLATFORM),ARM_ATSAM)
|
||||
PLATFORM_COMMON_DIR = $(COMMON_DIR)/arm_atsam
|
||||
else
|
||||
PLATFORM_COMMON_DIR = $(COMMON_DIR)/test
|
||||
endif
|
||||
PLATFORM_COMMON_DIR = $(COMMON_DIR)/$(PLATFORM_KEY)
|
||||
|
||||
TMK_COMMON_SRC += $(COMMON_DIR)/host.c \
|
||||
$(COMMON_DIR)/keyboard.c \
|
||||
|
@ -179,6 +171,4 @@ endif
|
|||
|
||||
# Search Path
|
||||
VPATH += $(TMK_PATH)/$(COMMON_DIR)
|
||||
ifeq ($(PLATFORM),CHIBIOS)
|
||||
VPATH += $(TMK_PATH)/$(COMMON_DIR)/chibios
|
||||
endif
|
||||
VPATH += $(TMK_PATH)/$(PLATFORM_COMMON_DIR)
|
||||
|
|
Loading…
Reference in New Issue