|
|
|
@ -8,12 +8,17 @@ endif
|
|
|
|
# TODO: opt in rather than assume everything uses a pro micro
|
|
|
|
# TODO: opt in rather than assume everything uses a pro micro
|
|
|
|
PIN_COMPATIBLE ?= promicro
|
|
|
|
PIN_COMPATIBLE ?= promicro
|
|
|
|
ifneq ($(CONVERT_TO),)
|
|
|
|
ifneq ($(CONVERT_TO),)
|
|
|
|
|
|
|
|
# stash so we can overwrite env provided vars if needed
|
|
|
|
|
|
|
|
ACTIVE_CONVERTER=$(CONVERT_TO)
|
|
|
|
|
|
|
|
|
|
|
|
# glob to search each platfrorm and/or check for valid converter
|
|
|
|
# glob to search each platfrorm and/or check for valid converter
|
|
|
|
CONVERTER := $(wildcard $(PLATFORM_PATH)/*/converters/$(PIN_COMPATIBLE)_to_$(CONVERT_TO)/)
|
|
|
|
CONVERTER := $(wildcard $(PLATFORM_PATH)/*/converters/$(PIN_COMPATIBLE)_to_$(CONVERT_TO)/)
|
|
|
|
ifeq ($(CONVERTER),)
|
|
|
|
ifeq ($(CONVERTER),)
|
|
|
|
$(call CATASTROPHIC_ERROR,Converting from '$(PIN_COMPATIBLE)' to '$(CONVERT_TO)' not possible!)
|
|
|
|
$(call CATASTROPHIC_ERROR,Converting from '$(PIN_COMPATIBLE)' to '$(CONVERT_TO)' not possible!)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-include $(CONVERTER)/pre_converter.mk
|
|
|
|
|
|
|
|
|
|
|
|
TARGET := $(TARGET)_$(CONVERT_TO)
|
|
|
|
TARGET := $(TARGET)_$(CONVERT_TO)
|
|
|
|
|
|
|
|
|
|
|
|
# Configure any defaults
|
|
|
|
# Configure any defaults
|
|
|
|
@ -22,6 +27,9 @@ ifneq ($(CONVERT_TO),)
|
|
|
|
OPT_DEFS += -DCONVERTER_ENABLED
|
|
|
|
OPT_DEFS += -DCONVERTER_ENABLED
|
|
|
|
VPATH += $(CONVERTER)
|
|
|
|
VPATH += $(CONVERTER)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Configure for "alias" - worst case it produces an idential define
|
|
|
|
|
|
|
|
OPT_DEFS += -DCONVERT_TO_$(strip $(shell echo $(ACTIVE_CONVERTER) | tr '[:lower:]' '[:upper:]'))
|
|
|
|
|
|
|
|
|
|
|
|
# Finally run any converter specific logic
|
|
|
|
# Finally run any converter specific logic
|
|
|
|
include $(CONVERTER)/converter.mk
|
|
|
|
include $(CONVERTER)/converter.mk
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|