summaryrefslogtreecommitdiff
path: root/builddefs
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2024-03-20 22:23:58 +0000
committerGitHub <noreply@github.com>2024-03-20 22:23:58 +0000
commit34374d2e2e4f5b827c8a0402b0cc8f177431e25a (patch)
tree04b4d98087bb1af12a47578e6e6cbfee83307a00 /builddefs
parent977f667da93754a4471423f321dfeb7389269445 (diff)
Assume only 32u4 boards can run 'promicro' converters (#23312)
Diffstat (limited to 'builddefs')
-rw-r--r--builddefs/converters.mk10
1 files changed, 8 insertions, 2 deletions
diff --git a/builddefs/converters.mk b/builddefs/converters.mk
index 96c8656b25..3e77a070f2 100644
--- a/builddefs/converters.mk
+++ b/builddefs/converters.mk
@@ -5,8 +5,10 @@ ifneq ($(findstring yes, $(CTPC)$(CONVERT_TO_PROTON_C)),)
$(call CATASTROPHIC_ERROR,The `CONVERT_TO_PROTON_C` and `CTPC` options are now deprecated. `CONVERT_TO=proton_c` should be used instead.)
endif
-# TODO: opt in rather than assume everything uses a pro micro
-PIN_COMPATIBLE ?= promicro
+ifneq (,$(filter $(MCU),atmega32u4))
+ # TODO: opt in rather than assume everything uses a pro micro
+ PIN_COMPATIBLE ?= promicro
+endif
# Remove whitespace from any rule.mk provided vars
# - env cannot be overwritten but cannot have whitespace anyway
@@ -16,6 +18,10 @@ ifneq ($(CONVERT_TO),)
# stash so we can overwrite env provided vars if needed
ACTIVE_CONVERTER=$(CONVERT_TO)
+ ifeq ($(PIN_COMPATIBLE),)
+ $(call CATASTROPHIC_ERROR,Converting to '$(CONVERT_TO)' not possible!)
+ endif
+
# glob to search each platfrorm and/or check for valid converter
CONVERTER := $(wildcard $(PLATFORM_PATH)/*/converters/$(PIN_COMPATIBLE)_to_$(CONVERT_TO)/)
ifeq ($(CONVERTER),)