2 *****************************************************************************
4 ** File : stm32_flash_h750_exst.ld
6 ** Abstract : Linker script for STM32H750xB Device with
7 ** 512K AXI-RAM mapped onto AXI bus on D1 domain
8 ** 128K SRAM1 mapped on D2 domain
9 ** 128K SRAM2 mapped on D2 domain
10 ** 32K SRAM3 mapped on D2 domain
11 ** 64K SRAM4 mapped on D3 domain
15 *****************************************************************************
22 0x00000000 to 0x0000FFFF 64K ITCM
23 0x20000000 to 0x2001FFFF 128K DTCM, main RAM
24 0x24000000 to 0x2407FFFF 512K AXI SRAM, D1 domain
25 0x30000000 to 0x3001FFFF 128K SRAM1, D2 domain
26 0x30020000 to 0x3003FFFF 128K SRAM2, D2 domain
27 0x30040000 to 0x30047FFF 32K SRAM3, D2 domain, unused
28 0x38000000 to 0x3800FFFF 64K SRAM4, D3 domain, unused
29 0x38800000 to 0x38800FFF 4K BACKUP SRAM, Backup domain, unused
31 0x08000000 to 0x0801FFFF 128K isr vector, startup code, firmware, no config! // FLASH_Sector_0
36 For H7 EXST (External Storage) targets a binary is built that is placed on an external device.
37 The bootloader will then copy this entire binary to RAM, at the CODE_RAM address. The bootloader
38 then executes code at the CODE_RAM address. The address of CODE_RAM is fixed to 0x24010000
39 and must not be changed.
41 Currently, this is inefficient as there are two copies of some sections in RAM. e.g. .tcm_code.
43 It would be technically possible to free more RAM by having a more intelligent build system
44 and bootloader which creates files for each of the sections that are usually copied from flash
45 to ram and one section for the main code. e.g. one file for .tcm_code, one file for .data and
46 one for the main code/data, then load each to the appropriate address and adjust the usual startup
47 code which will no-longer need to duplicate code/data sections from RAM to ITCM/DTCM RAM.
49 The initial CODE_RAM is sized at 448K to enable all firmware features and to as much RAM free as
54 /* see .exst section below */
57 /* Specify the memory areas */
60 ITCM_RAM (rwx) : ORIGIN = 0x00000000, LENGTH = 64K
61 DTCM_RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
62 RAM (rwx) : ORIGIN = 0x24000000, LENGTH = 64K
63 CODE_RAM (rx) : ORIGIN = 0x24010000, LENGTH = 448K - _exst_hash_size /* hard coded start address, as required by SPRACINGH7 boot loader, don't change! */
64 EXST_HASH (rx) : ORIGIN = 0x24010000 + LENGTH(CODE_RAM), LENGTH = _exst_hash_size
66 D2_RAM (rwx) : ORIGIN = 0x30000000, LENGTH = 256K /* SRAM1 + SRAM2 */
68 MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K
69 QUADSPI (rx) : ORIGIN = 0x90000000, LENGTH = 0K
72 REGION_ALIAS("STACKRAM", DTCM_RAM)
73 REGION_ALIAS("FASTRAM", DTCM_RAM)
74 REGION_ALIAS("MAIN", CODE_RAM)
76 INCLUDE "stm32_h750_common.ld"
80 /* used during startup to initialized dmaram_data */
81 _sdmaram_idata = LOADADDR(.dmaram_data);
86 PROVIDE(dmaram_start = .);
88 _dmaram_start__ = _sdmaram;
89 _sdmaram_data = .; /* create a global symbol at data start */
90 *(.dmaram_data) /* .data sections */
91 *(.dmaram_data*) /* .data* sections */
93 _edmaram_data = .; /* define a global symbol at data end */
97 .dmaram_bss (NOLOAD) :
100 __dmaram_bss_start__ = _sdmaram_bss;
102 *(SORT_BY_ALIGNMENT(.dmaram_bss*))
105 __dmaram_bss_end__ = _edmaram_bss;
112 PROVIDE(dmaram_end = .);
114 _dmaram_end__ = _edmaram;
117 .DMA_RW_D2 (NOLOAD) :
120 PROVIDE(dmarw_start = .);
122 _dmarw_start__ = _sdmarw;
124 PROVIDE(dmarw_end = .);
126 _dmarw_end__ = _edmarw;
129 .DMA_RW_AXI (NOLOAD) :
132 PROVIDE(dmarwaxi_start = .);
134 _dmarwaxi_start__ = _sdmarwaxi;
136 PROVIDE(dmarwaxi_end = .);
138 _dmarwaxi_end__ = _edmarwaxi;
142 INCLUDE "stm32_h750_common_post.ld"
143 INCLUDE "stm32_ram_h750_exst_post.ld"