2019-12-02 20:54:40 -08:00
|
|
|
# List of all the board related files.
|
2021-01-17 06:32:06 -08:00
|
|
|
BOARDCPPSRC = $(PROJECT_DIR)/config/boards/proteus/board_configuration.cpp \
|
2019-12-17 05:34:56 -08:00
|
|
|
$(PROJECT_DIR)/config/boards/proteus/adc_hack.cpp
|
2021-02-28 13:57:57 -08:00
|
|
|
|
2020-08-28 18:13:50 -07:00
|
|
|
BOARDINC = $(PROJECT_DIR)/config/boards/proteus
|
2019-12-02 20:54:40 -08:00
|
|
|
|
2021-03-13 04:26:58 -08:00
|
|
|
ifeq ($(PROJECT_CPU),ARCH_STM32F4)
|
|
|
|
IS_STM32F429 = yes
|
|
|
|
endif
|
|
|
|
|
2021-02-07 23:11:44 -08:00
|
|
|
DDEFS += -DEFI_USE_OSC=TRUE
|
2022-04-28 14:32:39 -07:00
|
|
|
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::E3
|
2022-02-09 16:55:04 -08:00
|
|
|
DDEFS += -DFIRMWARE_ID=\"proteus\"
|
2022-05-04 02:30:04 -07:00
|
|
|
DDEFS += $(VAR_DEF_ENGINE_TYPE)
|
2021-04-22 21:03:21 -07:00
|
|
|
|
2021-11-03 10:29:04 -07:00
|
|
|
DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
|
|
|
|
|
2020-12-22 17:50:01 -08:00
|
|
|
DDEFS += -DEFI_ICU_INPUTS=FALSE -DHAL_TRIGGER_USE_PAL=TRUE
|
|
|
|
DDEFS += -DEFI_LOGIC_ANALYZER=FALSE
|
2021-02-28 13:57:57 -08:00
|
|
|
|
2021-12-08 16:26:10 -08:00
|
|
|
DDEFS += -DEFI_CAN_SERIAL=TRUE
|
|
|
|
|
2022-01-31 05:57:37 -08:00
|
|
|
# Turn off stuff proteus doesn't have/need
|
|
|
|
DDEFS += -DEFI_CJ125=FALSE -DEFI_MAX_31855=FALSE -DBOARD_L9779_COUNT=0 -DBOARD_TLE8888_COUNT=0 -DEFI_HD44780_LCD=FALSE -DEFI_LCD=FALSE
|
|
|
|
|
2022-05-17 18:35:43 -07:00
|
|
|
# Any Proteus-based adapter boards with discrete-VR decoder are controlled via a 5v ignition output
|
|
|
|
DDEFS += -DVR_SUPPLY_VOLTAGE=5
|
|
|
|
|
2021-02-28 13:57:57 -08:00
|
|
|
# This stuff doesn't work on H7 yet
|
|
|
|
ifneq ($(PROJECT_CPU),ARCH_STM32H7)
|
|
|
|
DDEFS += -DSTM32_ADC_USE_ADC3=TRUE
|
|
|
|
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE
|
|
|
|
endif
|
|
|
|
|
2021-03-28 14:03:14 -07:00
|
|
|
# disable hardware serial ports on H7
|
2021-07-26 06:08:05 -07:00
|
|
|
ifeq ($(PROJECT_CPU),ARCH_STM32F4)
|
2021-03-28 14:03:14 -07:00
|
|
|
# Hardware serial port on UART 2 -> PD5/PD6
|
|
|
|
DDEFS += -DSTM32_UART_USE_USART2=TRUE
|
2021-11-19 21:39:08 -08:00
|
|
|
DDEFS += -DTS_PRIMARY_PORT=UARTD2
|
2022-04-28 14:32:39 -07:00
|
|
|
DDEFS += -DEFI_CONSOLE_TX_BRAIN_PIN=Gpio::D5 -DEFI_CONSOLE_RX_BRAIN_PIN=Gpio::D6
|
2021-03-28 14:03:14 -07:00
|
|
|
endif
|
2020-12-22 17:50:01 -08:00
|
|
|
|
2020-12-17 14:12:24 -08:00
|
|
|
# We are running on Proteus hardware!
|
|
|
|
DDEFS += -DHW_PROTEUS=1
|
|
|
|
|
2020-05-10 06:19:01 -07:00
|
|
|
# Proteus <=v0.2 needs ADC hack - vbatt is on ADC3
|
|
|
|
ifeq ($(PROTEUS_LEGACY),TRUE)
|
|
|
|
DDEFS += -DUSE_ADC3_VBATT_HACK
|
|
|
|
endif
|
2022-04-18 11:22:05 -07:00
|
|
|
|
|
|
|
ifeq ($(PROJECT_CPU),ARCH_STM32F7)
|
|
|
|
DDEFS += -DSHORT_BOARD_NAME=proteus_f7
|
|
|
|
else ifeq ($(PROJECT_CPU),ARCH_STM32F4)
|
|
|
|
DDEFS += -DSHORT_BOARD_NAME=proteus_f4
|
|
|
|
else ifeq ($(PROJECT_CPU),ARCH_STM32H7)
|
|
|
|
DDEFS += -DSHORT_BOARD_NAME=proteus_h7
|
|
|
|
else
|
|
|
|
$(error Unsupported PROJECT_CPU for Proteus: [$(PROJECT_CPU)])
|
|
|
|
endif
|