mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 03:20:00 +03:00
Merge pull request #10791 from mikeller/add_stm32h743_unified_target
This commit is contained in:
parent
60ea8e9f73
commit
089cae0af1
5 changed files with 72 additions and 9 deletions
|
@ -82,7 +82,8 @@ UNSUPPORTED_TARGETS := \
|
|||
UNIFIED_TARGETS := STM32F405 \
|
||||
STM32F411 \
|
||||
STM32F7X2 \
|
||||
STM32F745
|
||||
STM32F745 \
|
||||
STM32H743
|
||||
|
||||
# Legacy targets are targets that have been replaced by Unified Target configurations
|
||||
LEGACY_TARGETS := MATEKF405 \
|
||||
|
|
|
@ -37,9 +37,11 @@ ENTRY(Reset_Handler)
|
|||
/* Specify the memory areas */
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 128K
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 10K
|
||||
FLASH_CUSTOM_DEFAULTS (r) : ORIGIN = 0x08002800, LENGTH = 118K
|
||||
FLASH_CONFIG (r) : ORIGIN = 0x08020000, LENGTH = 128K
|
||||
FLASH1 (rx) : ORIGIN = 0x08040000, LENGTH = 1792K
|
||||
FLASH1 (rx) : ORIGIN = 0x08040000, LENGTH = DEFINED(USE_CUSTOM_DEFAULTS_EXTENDED) ? 1664K : 1792K
|
||||
FLASH_CUSTOM_DEFAULTS_EXTENDED (r): ORIGIN = DEFINED(USE_CUSTOM_DEFAULTS_EXTENDED) ? 0x081E0000 : 0x08200000, LENGTH = DEFINED(USE_CUSTOM_DEFAULTS_EXTENDED) ? 128K : 0K
|
||||
|
||||
ITCM_RAM (rwx) : ORIGIN = 0x00000000, LENGTH = 64K
|
||||
DTCM_RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
|
||||
|
@ -139,14 +141,29 @@ SECTIONS
|
|||
KEEP (*(.pg_registry))
|
||||
KEEP (*(SORT(.pg_registry.*)))
|
||||
PROVIDE_HIDDEN (__pg_registry_end = .);
|
||||
} >FLASH
|
||||
} >FLASH1
|
||||
|
||||
.pg_resetdata :
|
||||
{
|
||||
PROVIDE_HIDDEN (__pg_resetdata_start = .);
|
||||
KEEP (*(.pg_resetdata))
|
||||
PROVIDE_HIDDEN (__pg_resetdata_end = .);
|
||||
} >FLASH
|
||||
} >FLASH1
|
||||
|
||||
/* Storage for the address for the configuration section so we can grab it out of the hex file */
|
||||
.custom_defaults :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP (*(.custom_defaults_start_address))
|
||||
. = ALIGN(4);
|
||||
KEEP (*(.custom_defaults_end_address))
|
||||
. = ALIGN(4);
|
||||
__custom_defaults_internal_start = .;
|
||||
*(.custom_defaults);
|
||||
} >FLASH_CUSTOM_DEFAULTS
|
||||
|
||||
PROVIDE_HIDDEN (__custom_defaults_start = DEFINED(USE_CUSTOM_DEFAULTS_EXTENDED) ? ORIGIN(FLASH_CUSTOM_DEFAULTS_EXTENDED) : __custom_defaults_internal_start);
|
||||
PROVIDE_HIDDEN (__custom_defaults_end = DEFINED(USE_CUSTOM_DEFAULTS_EXTENDED) ? ORIGIN(FLASH_CUSTOM_DEFAULTS_EXTENDED) + LENGTH(FLASH_CUSTOM_DEFAULTS_EXTENDED) : ORIGIN(FLASH_CUSTOM_DEFAULTS) + LENGTH(FLASH_CUSTOM_DEFAULTS));
|
||||
|
||||
/* used by the startup to initialize data */
|
||||
_sidata = LOADADDR(.data);
|
||||
|
|
0
src/main/target/STM32_UNIFIED/STM32H743.mk
Normal file
0
src/main/target/STM32_UNIFIED/STM32H743.mk
Normal file
|
@ -147,6 +147,48 @@
|
|||
#define TARGET_IO_PORTD 0xffff
|
||||
#define TARGET_IO_PORTE 0xffff
|
||||
#define TARGET_IO_PORTF 0xffff
|
||||
|
||||
#elif defined(STM32H743)
|
||||
#define TARGET_BOARD_IDENTIFIER "SH47"
|
||||
|
||||
#define USBD_PRODUCT_STRING "Betaflight STM32H743"
|
||||
|
||||
#define USE_I2C_DEVICE_1
|
||||
#define USE_I2C_DEVICE_2
|
||||
#define USE_I2C_DEVICE_3
|
||||
#define USE_I2C_DEVICE_4
|
||||
|
||||
#define USE_UART1
|
||||
#define USE_UART2
|
||||
#define USE_UART3
|
||||
#define USE_UART4
|
||||
#define USE_UART5
|
||||
#define USE_UART6
|
||||
#define USE_UART7
|
||||
#define USE_UART8
|
||||
#define USE_LPUART1
|
||||
|
||||
#define SERIAL_PORT_COUNT (UNIFIED_SERIAL_PORT_COUNT + 9)
|
||||
|
||||
#define USE_SPI_DEVICE_1
|
||||
#define USE_SPI_DEVICE_2
|
||||
#define USE_SPI_DEVICE_3
|
||||
#define USE_SPI_DEVICE_4
|
||||
#define USE_SPI_DEVICE_5
|
||||
#define USE_SPI_DEVICE_6
|
||||
|
||||
#define TARGET_IO_PORTA 0xffff
|
||||
#define TARGET_IO_PORTB 0xffff
|
||||
#define TARGET_IO_PORTC 0xffff
|
||||
#define TARGET_IO_PORTD 0xffff
|
||||
#define TARGET_IO_PORTE 0xffff
|
||||
#define TARGET_IO_PORTF 0xffff
|
||||
#define TARGET_IO_PORTG 0xffff
|
||||
|
||||
#elif !defined(UNIT_TEST)
|
||||
|
||||
#error "No resources defined for this Unified Target."
|
||||
|
||||
#endif
|
||||
|
||||
// Treat the target as unified, and expect manufacturer id / board name
|
||||
|
@ -198,8 +240,6 @@
|
|||
|
||||
#define USE_SDCARD
|
||||
#define USE_SDCARD_SPI
|
||||
#if !defined(STM32G4)
|
||||
// G4 support needs fixing
|
||||
#define USE_SDCARD_SDIO
|
||||
|
||||
#define USE_FLASHFS
|
||||
|
|
|
@ -9,14 +9,19 @@ else
|
|||
ifeq ($(TARGET), STM32F7X2)
|
||||
F7X2RE_TARGETS += $(TARGET)
|
||||
|
||||
else # STM32F745
|
||||
else
|
||||
ifeq ($(TARGET), STM32F745)
|
||||
F7X5XG_TARGETS += $(TARGET)
|
||||
|
||||
else # STM32H743
|
||||
H743xI_TARGETS += $(TARGET)
|
||||
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), $(filter $(TARGET), STM32F405 STM32F745))
|
||||
ifeq ($(TARGET), $(filter $(TARGET), STM32F405 STM32F745 STM32H743))
|
||||
# Use a full block (16 kB) of flash for custom defaults - with 1 MB flash we have more than we know how to use anyway
|
||||
|
||||
CUSTOM_DEFAULTS_EXTENDED = yes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue