2019-11-03 05:41:14 -08:00
|
|
|
# Combine the related files for a specific platform and MCU.
|
2019-08-01 19:27:23 -07:00
|
|
|
|
2019-11-03 05:41:14 -08:00
|
|
|
# Target ECU board design
|
2021-01-17 06:32:06 -08:00
|
|
|
BOARDCPPSRC = $(BOARDS_DIR)/microrusefi/board_configuration.cpp
|
2019-11-03 05:41:14 -08:00
|
|
|
|
|
|
|
# Target processor details
|
|
|
|
ifeq ($(PROJECT_CPU),ARCH_STM32F4)
|
2021-01-17 06:32:06 -08:00
|
|
|
BOARDINC = $(BOARDS_DIR)/microrusefi
|
2019-11-03 05:41:14 -08:00
|
|
|
BOARDINC += $(PROJECT_DIR)/config/stm32f4ems # For board.h
|
2020-09-22 00:48:17 -07:00
|
|
|
BOARDINC += $(BOARDS_DIR)/microrusefi # For knock_config.h
|
2019-11-03 05:41:14 -08:00
|
|
|
else
|
2020-09-22 00:48:17 -07:00
|
|
|
BOARDINC += $(BOARDS_DIR)/microrusefi # For knock_config.h
|
2019-11-03 05:41:14 -08:00
|
|
|
endif
|
2019-08-01 19:27:23 -07:00
|
|
|
|
2019-09-20 05:40:07 -07:00
|
|
|
# Set this if you want a default engine type other than normal MRE
|
|
|
|
ifeq ($(DEFAULT_ENGINE_TYPE),)
|
|
|
|
DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=MICRO_RUS_EFI
|
|
|
|
endif
|
|
|
|
|
2020-05-11 15:27:43 -07:00
|
|
|
ifeq ($(LED_CRITICAL_ERROR_BRAIN_PIN),)
|
|
|
|
LED_CRITICAL_ERROR_BRAIN_PIN = -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOE_3
|
2019-11-19 18:56:25 -08:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2020-05-14 16:10:01 -07:00
|
|
|
# *TEMPORARY* breaking TTL thus breaking Bluetooth for microRusEFI in order to enable SPI3 for SD card
|
|
|
|
# *TODO* need to give people the horrible choice between Bluetooth via TTL or SD card via SPI :( horrible choice
|
2020-07-14 16:59:55 -07:00
|
|
|
EFI_CONSOLE_TTL_PINS = -DEFI_CONSOLE_TX_BRAIN_PIN=GPIOB_10 -DEFI_CONSOLE_RX_BRAIN_PIN=GPIOB_11
|
2020-05-13 21:02:10 -07:00
|
|
|
|
|
|
|
|
2019-11-03 05:41:14 -08:00
|
|
|
# Add them all together
|
2021-02-07 23:11:44 -08:00
|
|
|
DDEFS += -DEFI_USE_OSC=TRUE -DFIRMWARE_ID=\"microRusEFI\" $(DEFAULT_ENGINE_TYPE) $(LED_CRITICAL_ERROR_BRAIN_PIN) $(EFI_CONSOLE_TTL_PINS) -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
2020-05-13 21:02:10 -07:00
|
|
|
|
2020-12-17 14:12:24 -08:00
|
|
|
# We are running on microRusEFI hardware!
|
|
|
|
DDEFS += -DHW_MICRO_RUSEFI=1
|
2021-01-17 06:32:06 -08:00
|
|
|
|
|
|
|
# Shared variables
|
|
|
|
ALLCPPSRC += $(BOARDCPPSRC)
|
|
|
|
ALLINC += $(BOARDINC)
|