diff --git a/firmware/config/boards/f746-discovery/board.mk b/firmware/config/boards/f746-discovery/board.mk new file mode 100644 index 00000000000..dfc86a0c750 --- /dev/null +++ b/firmware/config/boards/f746-discovery/board.mk @@ -0,0 +1,39 @@ +# List of all the board related files. +BOARDCPPSRC = $(BOARD_DIR)/board_configuration.cpp + +DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::I1 + +# Specific MCU +#CHIBIOS_MCU_TYPE = STM32F746xx +# This is almost the same, but STM32F746xx is already defined in board.h file in ChibiOS +# Defining STM32F746xx here will cause redefined error during compilation. +CHIBIOS_MCU_TYPE = STM32F745xx +# Stock board.c from ChibiOS +BOARD_C = $(CHIBIOS)/os/hal/boards/ST_STM32F746G_DISCOVERY/board.c +# Stock board.h from ChibiOS +BOARDINC = $(CHIBIOS)/os/hal/boards/ST_STM32F746G_DISCOVERY/ + +# Default F7 linker script is not compatible +LDSCRIPT = $(PROJECT_DIR)/hw_layer/ports/stm32/stm32f7/STM32F746xG.ld + +# Save some RAM until we enable SDRAM. +DDEFS += -DEFI_LUA=FALSE + +# USB OTG FS connector: +DDEFS += -DEFI_USB_SERIAL_DM=Gpio::A11 +DDEFS += -DEFI_USB_SERIAL_DP=Gpio::A12 +DDEFS += -DEFI_USB_AF=10 + +DDEFS += -DEFI_DYNO_VIEW=FALSE + +# TODO: Enable ethernet +#LWIP = yes +#ALLOW_SHADOW = yes +#DDEFS += -DCH_CFG_USE_DYNAMIC=TRUE +#DDEFS += -DEFI_ETHERNET=TRUE + +BUNDLE_OPENOCD = yes + +DDEFS += -DFIRMWARE_ID=\"f746\" +DDEFS += -DDEFAULT_ENGINE_TYPE=engine_type_e::MINIMAL_PINS +DDEFS += -DSTATIC_BOARD_ID=STATIC_BOARD_ID_F746_DISCOVERY diff --git a/firmware/config/boards/f746-discovery/board_configuration.cpp b/firmware/config/boards/f746-discovery/board_configuration.cpp new file mode 100644 index 00000000000..4d3b86f5e1e --- /dev/null +++ b/firmware/config/boards/f746-discovery/board_configuration.cpp @@ -0,0 +1,14 @@ +#include "pch.h" + +Gpio getWarningLedPin() { + // this board has no warning led + return Gpio::Unassigned; +} + +Gpio getCommsLedPin() { + return Gpio::Unassigned; +} + +Gpio getRunningLedPin() { + return Gpio::Unassigned; +} diff --git a/firmware/config/boards/f746-discovery/compile_f746-discovery.sh b/firmware/config/boards/f746-discovery/compile_f746-discovery.sh new file mode 100644 index 00000000000..3ba66542d94 --- /dev/null +++ b/firmware/config/boards/f746-discovery/compile_f746-discovery.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +cd ../../.. && bash bin/compile.sh config/boards/f746-discovery/meta-info.env diff --git a/firmware/config/boards/f746-discovery/meta-info.env b/firmware/config/boards/f746-discovery/meta-info.env new file mode 100644 index 00000000000..ca5fabbdc94 --- /dev/null +++ b/firmware/config/boards/f746-discovery/meta-info.env @@ -0,0 +1,3 @@ +SHORT_BOARD_NAME=f746-discovery +PROJECT_CPU=ARCH_STM32F7 +SKIP_RATE=95 diff --git a/firmware/config/boards/f746-discovery/prepend.txt b/firmware/config/boards/f746-discovery/prepend.txt new file mode 100644 index 00000000000..e69de29bb2d