diff --git a/src/main/target/link/stm32_flash_f765xg.ld b/src/main/target/link/stm32_flash_f765xg.ld index a83374e4e41..ea548ed4ff3 100644 --- a/src/main/target/link/stm32_flash_f765xg.ld +++ b/src/main/target/link/stm32_flash_f765xg.ld @@ -1,10 +1,10 @@ /* ***************************************************************************** ** -** File : stm32_flash_f745.ld +** File : stm32_flash_f765xg.ld ** -** Abstract : Linker script for STM32F745VGTx Device with -** 1024KByte FLASH, 320KByte RAM +** Abstract : Linker script for STM32F765xGTx Device with +** 1024KByte FLASH, 512KByte RAM ** ***************************************************************************** */ @@ -29,7 +29,7 @@ MEMORY { ITCM_RAM (rx) : ORIGIN = 0x00000000, LENGTH = 16K ITCM_FLASH (rx) : ORIGIN = 0x00200000, LENGTH = 32K - /* config occupies the entire flash sector 1 for the ease of erasure, 32K on F74x */ + /* config occupies the entire flash sector 1 for the ease of erasure, 32K on F7xx */ ITCM_FLASH_CONFIG (r) : ORIGIN = 0x00208000, LENGTH = 32K ITCM_FLASH1 (rx) : ORIGIN = 0x00210000, LENGTH = 960K @@ -37,12 +37,16 @@ MEMORY FLASH_CONFIG (r) : ORIGIN = 0x08008000, LENGTH = 32K FLASH1 (rx) : ORIGIN = 0x08010000, LENGTH = 960K - TCM (rwx) : ORIGIN = 0x20000000, LENGTH = 64K - RAM (rwx) : ORIGIN = 0x20010000, LENGTH = 256K + DTCM_RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 128K + SRAM1 (rwx) : ORIGIN = 0x20020000, LENGTH = 368K + SRAM2 (rwx) : ORIGIN = 0x2007C000, LENGTH = 16K MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K } -/* note CCM could be used for stack */ -REGION_ALIAS("STACKRAM", TCM) -REGION_ALIAS("FASTRAM", TCM) +/* STM32F765 DTCM is 128KB (0x20000000-0x2001FFFF); SRAM1 starts at 0x20020000. + * DMA cannot access DTCM on STM32F7 - all DMA buffers must be in SRAM1 or SRAM2. + * NOTE: F745 DTCM is only 64KB, so F745 SRAM1 starts at 0x20010000 (different!). */ +REGION_ALIAS("STACKRAM", DTCM_RAM) +REGION_ALIAS("FASTRAM", DTCM_RAM) +REGION_ALIAS("RAM", SRAM1) INCLUDE "stm32_flash_f7_split.ld" diff --git a/src/main/target/link/stm32_flash_f765xg_bl.ld b/src/main/target/link/stm32_flash_f765xg_bl.ld index d357aad98d8..92f3d36754b 100644 --- a/src/main/target/link/stm32_flash_f765xg_bl.ld +++ b/src/main/target/link/stm32_flash_f765xg_bl.ld @@ -1,10 +1,10 @@ /* ***************************************************************************** ** -** File : stm32_flash_f745.ld +** File : stm32_flash_f765xg_bl.ld ** -** Abstract : Linker script for STM32F745VGTx Device with -** 1024KByte FLASH, 320KByte RAM +** Abstract : Linker script for STM32F765xGTx Device with +** 1024KByte FLASH, 512KByte RAM (bootloader) ** ***************************************************************************** */ @@ -29,7 +29,7 @@ MEMORY { ITCM_RAM (rx) : ORIGIN = 0x00000000, LENGTH = 16K ITCM_FLASH (rx) : ORIGIN = 0x00200000, LENGTH = 32K - /* config occupies the entire flash sector 1 for the ease of erasure, 32K on F74x */ + /* config occupies the entire flash sector 1 for the ease of erasure, 32K on F7xx */ ITCM_FLASH_CONFIG (r) : ORIGIN = 0x00208000, LENGTH = 32K ITCM_FLASH1 (rx) : ORIGIN = 0x00210000, LENGTH = 928K @@ -37,13 +37,17 @@ MEMORY FIRMWARE (rx) : ORIGIN = 0x08008000, LENGTH = 32K FLASH_CONFIG (r) : ORIGIN = 0x08010000, LENGTH = 32K - TCM (rwx) : ORIGIN = 0x20000000, LENGTH = 64K - RAM (rwx) : ORIGIN = 0x20010000, LENGTH = 256K + DTCM_RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 128K + SRAM1 (rwx) : ORIGIN = 0x20020000, LENGTH = 368K + SRAM2 (rwx) : ORIGIN = 0x2007C000, LENGTH = 16K MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K } -/* note CCM could be used for stack */ -REGION_ALIAS("STACKRAM", TCM) -REGION_ALIAS("FASTRAM", TCM) +/* STM32F765 DTCM is 128KB (0x20000000-0x2001FFFF); SRAM1 starts at 0x20020000. + * DMA cannot access DTCM on STM32F7 - all DMA buffers must be in SRAM1 or SRAM2. + * NOTE: F745 DTCM is only 64KB, so F745 SRAM1 starts at 0x20010000 (different!). */ +REGION_ALIAS("STACKRAM", DTCM_RAM) +REGION_ALIAS("FASTRAM", DTCM_RAM) +REGION_ALIAS("RAM", SRAM1) __firmware_start = ORIGIN(FIRMWARE); diff --git a/src/main/target/link/stm32_flash_f765xg_for_bl.ld b/src/main/target/link/stm32_flash_f765xg_for_bl.ld index c7667d1dc26..b50247b015d 100644 --- a/src/main/target/link/stm32_flash_f765xg_for_bl.ld +++ b/src/main/target/link/stm32_flash_f765xg_for_bl.ld @@ -1,10 +1,10 @@ /* ***************************************************************************** ** -** File : stm32_flash_f745.ld +** File : stm32_flash_f765xg_for_bl.ld ** -** Abstract : Linker script for STM32F745VGTx Device with -** 1024KByte FLASH, 320KByte RAM +** Abstract : Linker script for STM32F765xGTx Device with +** 1024KByte FLASH, 512KByte RAM (bootloader-aware) ** ***************************************************************************** */ @@ -29,7 +29,7 @@ MEMORY { ITCM_RAM (rx) : ORIGIN = 0x00000000, LENGTH = 16K ITCM_FLASH (rx) : ORIGIN = 0x00200000, LENGTH = 32K - /* config occupies the entire flash sector 1 for the ease of erasure, 32K on F74x */ + /* config occupies the entire flash sector 1 for the ease of erasure, 32K on F7xx */ ITCM_FLASH_CONFIG (r) : ORIGIN = 0x00208000, LENGTH = 32K ITCM_FLASH1 (rx) : ORIGIN = 0x00210000, LENGTH = 960K @@ -37,13 +37,17 @@ MEMORY FLASH_CONFIG (r) : ORIGIN = 0x08010000, LENGTH = 32K FLASH1 (rx) : ORIGIN = 0x08018000, LENGTH = 928K - TCM (rwx) : ORIGIN = 0x20000000, LENGTH = 64K - RAM (rwx) : ORIGIN = 0x20010000, LENGTH = 256K + DTCM_RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 128K + SRAM1 (rwx) : ORIGIN = 0x20020000, LENGTH = 368K + SRAM2 (rwx) : ORIGIN = 0x2007C000, LENGTH = 16K MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K } -/* note CCM could be used for stack */ -REGION_ALIAS("STACKRAM", TCM) -REGION_ALIAS("FASTRAM", TCM) +/* STM32F765 DTCM is 128KB (0x20000000-0x2001FFFF); SRAM1 starts at 0x20020000. + * DMA cannot access DTCM on STM32F7 - all DMA buffers must be in SRAM1 or SRAM2. + * NOTE: F745 DTCM is only 64KB, so F745 SRAM1 starts at 0x20010000 (different!). */ +REGION_ALIAS("STACKRAM", DTCM_RAM) +REGION_ALIAS("FASTRAM", DTCM_RAM) +REGION_ALIAS("RAM", SRAM1) __firmware_start = ORIGIN(FLASH);