Skip to content

Commit 6ffb9a3

Browse files
committed
variants/GENERIC_STM32H747_M4: Update linker_script to support DRAM firmware.
To load the M4 firmware into SDRAM, we must ensure the linker script does not include any loadable sections that are placed in the shared memory region. If such sections exist, the ELF loader will overwrite the shared memory region when loading the firmware. Additionally, the Open-AMP section is no longer required, as the resource table is now populated manually in resource_table_init. Therefore, this section can be removed. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
1 parent a208513 commit 6ffb9a3

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

variants/GENERIC_STM32H747_M4/linker_script.ld

+7-10
Original file line numberDiff line numberDiff line change
@@ -91,24 +91,21 @@ SECTIONS
9191
__bss_end__ = .;
9292
_ebss = .;
9393
} > RAM
94-
.openamp_section (NOLOAD) : {
95-
. = ABSOLUTE(0x38000000);
96-
*(.resource_table)
97-
} >RAM_D3 AT > FLASH
98-
.pdm_section (NOLOAD) : {
99-
. = ABSOLUTE(0x3800FC00);
100-
*(.pdm_buffer)
101-
} > RAM_D3
10294

103-
.heap (COPY):
95+
.pdm_section 0x3800FC00 (NOLOAD): {
96+
*(.pdm_buffer)
97+
} > RAM_D3
98+
99+
.heap (NOLOAD):
104100
{
105101
__end__ = .;
106102
PROVIDE(end = .);
107103
*(.heap*)
108104
. = ORIGIN(RAM) + LENGTH(RAM) - 0x400;
109105
__HeapLimit = .;
110106
} > RAM
111-
.stack_dummy (COPY):
107+
108+
.stack_dummy (NOLOAD):
112109
{
113110
*(.stack*)
114111
} > RAM

0 commit comments

Comments
 (0)