Skip to content

Commit

Permalink
variants/GENERIC_STM32H747_M4: Update linker_script to support DRAM f…
Browse files Browse the repository at this point in the history
…irmware.

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 <[email protected]>
  • Loading branch information
iabdalkader committed Aug 1, 2024
1 parent a208513 commit 6ffb9a3
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions variants/GENERIC_STM32H747_M4/linker_script.ld
Original file line number Diff line number Diff line change
Expand Up @@ -91,24 +91,21 @@ SECTIONS
__bss_end__ = .;
_ebss = .;
} > RAM
.openamp_section (NOLOAD) : {
. = ABSOLUTE(0x38000000);
*(.resource_table)
} >RAM_D3 AT > FLASH
.pdm_section (NOLOAD) : {
. = ABSOLUTE(0x3800FC00);
*(.pdm_buffer)
} > RAM_D3

.heap (COPY):
.pdm_section 0x3800FC00 (NOLOAD): {
*(.pdm_buffer)
} > RAM_D3

.heap (NOLOAD):
{
__end__ = .;
PROVIDE(end = .);
*(.heap*)
. = ORIGIN(RAM) + LENGTH(RAM) - 0x400;
__HeapLimit = .;
} > RAM
.stack_dummy (COPY):

.stack_dummy (NOLOAD):
{
*(.stack*)
} > RAM
Expand Down

0 comments on commit 6ffb9a3

Please sign in to comment.