Skip to content

Commit 2d652eb

Browse files
committed
Add dedicated section for pdm buffer
1 parent cf72a29 commit 2d652eb

File tree

2 files changed

+14
-8
lines changed
  • targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI

2 files changed

+14
-8
lines changed

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7_M4/TOOLCHAIN_GCC_ARM/STM32H747xI.ld

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ M_CRASH_DATA_RAM_SIZE = 0x100;
2929
MEMORY
3030
{
3131
RAM (xrw) : ORIGIN = RAM_START + 0x298, LENGTH = RAM_SIZE - 0x298
32-
OPENAMP_RSC_TAB (rwx) : ORIGIN = 0x38000000, LENGTH = 1K
33-
OPEN_AMP_SHMEM (rwx) : ORIGIN = 0x38000400, LENGTH = 63K
32+
OPENAMP_RSC_TAB (rwx) : ORIGIN = 0x38000400, LENGTH = 1K
33+
OPEN_AMP_SHMEM (rwx) : ORIGIN = 0x38000800, LENGTH = 62K
3434
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
3535
}
3636
__OPENAMP_region_start__ = ORIGIN(OPEN_AMP_SHMEM);
37-
__OPENAMP_region_end__ = ORIGIN(OPEN_AMP_SHMEM) + LENGTH(OPEN_AMP_SHMEM);
37+
__OPENAMP_region_end__ = ORIGIN(OPEN_AMP_SHMEM) + LENGTH(OPEN_AMP_SHMEM) - 1;
3838

3939
/* Linker script to place sections and symbol values. Should be used together
4040
* with other linker script that defines memory regions FLASH and RAM.
@@ -178,7 +178,7 @@ SECTIONS
178178
} > RAM
179179

180180
.openamp_section (NOLOAD) : {
181-
. = ABSOLUTE(0x38000000);
181+
. = ABSOLUTE(0x38000400);
182182
*(.resource_table)
183183
} >OPENAMP_RSC_TAB AT > FLASH
184184

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7_M7/TOOLCHAIN_GCC_ARM/STM32H747xI.ld

+10-4
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ MEMORY
3232
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
3333
RAM (xrw) : ORIGIN = RAM_START + 0x298, LENGTH = RAM_SIZE - 0x298
3434
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
35-
OPENAMP_RSC_TAB (rwx) : ORIGIN = 0x38000000, LENGTH = 1K
36-
OPEN_AMP_SHMEM (rwx) : ORIGIN = 0x38000400, LENGTH = 63K
35+
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 1k
36+
OPENAMP_RSC_TAB (rwx) : ORIGIN = 0x38000400, LENGTH = 1K
37+
OPEN_AMP_SHMEM (rwx) : ORIGIN = 0x38000800, LENGTH = 62K
3738
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
3839
}
3940
__OPENAMP_region_start__ = ORIGIN(OPEN_AMP_SHMEM);
40-
__OPENAMP_region_end__ = ORIGIN(OPEN_AMP_SHMEM) + LENGTH(OPEN_AMP_SHMEM);
41+
__OPENAMP_region_end__ = ORIGIN(OPEN_AMP_SHMEM) + LENGTH(OPEN_AMP_SHMEM) - 1;
4142

4243
_ConfigStart = 0x0801F000;
4344

@@ -187,8 +188,13 @@ SECTIONS
187188
__HeapLimit = .;
188189
} > RAM
189190

190-
.openamp_section (NOLOAD) : {
191+
.ram_d3 (NOLOAD) : {
191192
. = ABSOLUTE(0x38000000);
193+
*(.pdm_buffer)
194+
} > RAM_D3
195+
196+
.openamp_section (NOLOAD) : {
197+
. = ABSOLUTE(0x38000400);
192198
*(.resource_table)
193199
} >OPENAMP_RSC_TAB AT > FLASH
194200

0 commit comments

Comments
 (0)