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