Skip to content

Commit

Permalink
configs: add preliminary support for STM32F746-DISCOVERY
Browse files Browse the repository at this point in the history
  • Loading branch information
dron0gus committed Feb 19, 2025
1 parent c9b3d83 commit 840488d
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 0 deletions.
39 changes: 39 additions & 0 deletions firmware/config/boards/f746-discovery/board.mk
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions firmware/config/boards/f746-discovery/board_configuration.cpp
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
cd ../../.. && bash bin/compile.sh config/boards/f746-discovery/meta-info.env
3 changes: 3 additions & 0 deletions firmware/config/boards/f746-discovery/meta-info.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SHORT_BOARD_NAME=f746-discovery
PROJECT_CPU=ARCH_STM32F7
SKIP_RATE=95
Empty file.

0 comments on commit 840488d

Please sign in to comment.