Commit 12f1a30 1 parent 364a910 commit 12f1a30 Copy full SHA for 12f1a30
File tree 2 files changed +10
-0
lines changed
platforms/chibios/converters/promicro_to_bonsai_c3
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 8
8
# TODO: opt in rather than assume everything uses a pro micro
9
9
PIN_COMPATIBLE ?= promicro
10
10
ifneq ($(CONVERT_TO ) ,)
11
+ # stash so we can overwrite env provided vars if needed
12
+ ACTIVE_CONVERTER =$(CONVERT_TO )
13
+
11
14
# glob to search each platfrorm and/or check for valid converter
12
15
CONVERTER := $(wildcard $(PLATFORM_PATH ) /* /converters/$(PIN_COMPATIBLE ) _to_$(CONVERT_TO ) /)
13
16
ifeq ($(CONVERTER),)
14
17
$(call CATASTROPHIC_ERROR,Converting from '$(PIN_COMPATIBLE)' to '$(CONVERT_TO)' not possible!)
15
18
endif
16
19
20
+ -include $(CONVERTER ) /pre_converter.mk
21
+
17
22
TARGET := $(TARGET ) _$(CONVERT_TO )
18
23
19
24
# Configure any defaults
@@ -22,6 +27,9 @@ ifneq ($(CONVERT_TO),)
22
27
OPT_DEFS += -DCONVERTER_ENABLED
23
28
VPATH += $(CONVERTER )
24
29
30
+ # Configure for "alias" - worst case it produces an idential define
31
+ OPT_DEFS += -DCONVERT_TO_$(strip $(shell echo $(ACTIVE_CONVERTER ) | tr '[:lower:]' '[:upper:]') )
32
+
25
33
# Finally run any converter specific logic
26
34
include $(CONVERTER ) /converter.mk
27
35
endif
Original file line number Diff line number Diff line change
1
+ CONVERTER: =platforms/chibios/converters/promicro_to_proton_c
2
+ ACTIVE_CONVERTER: =proton_c
You can’t perform that action at this time.
0 commit comments