mirror of https://github.com/ARMmbed/mbed-os.git
STM32H7 : update linker script files to use right location for lwip_ram_heap
Signed-off-by: Vincent Veron <vincent.veron@st.com>pull/11274/head
parent
9f2e9aa576
commit
76fb4d22cc
|
@ -28,9 +28,6 @@
|
|||
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; STM32F767ZI: 2048KB FLASH (0x200000) + 128KB DTCM RAM (0x20000)
|
||||
; 166 vectors = 664 bytes (0x298) to be reserved in RAM
|
||||
|
||||
#if !defined(MBED_APP_START)
|
||||
#define MBED_APP_START 0x08000000
|
||||
#endif
|
||||
|
@ -45,8 +42,8 @@
|
|||
|
||||
#define Stack_Size MBED_BOOT_STACK_SIZE
|
||||
|
||||
#define MBED_RAM_START 0x20000000
|
||||
#define MBED_RAM_SIZE 0x20000
|
||||
#define MBED_RAM_START 0x24000000
|
||||
#define MBED_RAM_SIZE 0x80000
|
||||
#define MBED_VECTTABLE_RAM_START (MBED_RAM_START)
|
||||
#define MBED_VECTTABLE_RAM_SIZE 0x298
|
||||
#define MBED_CRASH_REPORT_RAM_START (MBED_VECTTABLE_RAM_START + MBED_VECTTABLE_RAM_SIZE)
|
||||
|
@ -71,4 +68,18 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
|
|||
|
||||
ARM_LIB_STACK (MBED_RAM0_START+MBED_RAM0_SIZE) EMPTY -Stack_Size { ; stack
|
||||
}
|
||||
|
||||
RW_DMARxDscrTab 0x30040000 0x60 {
|
||||
*(.RxDecripSection)
|
||||
}
|
||||
RW_DMATxDscrTab 0x30040100 0x140 {
|
||||
*(.TxDecripSection)
|
||||
}
|
||||
RW_Rx_Buffb 0x30040400 0x1800 {
|
||||
*(.RxArraySection)
|
||||
}
|
||||
RW_Eth_Ram 0x30044000 0x4000 {
|
||||
*(.ethusbram)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,7 +19,11 @@ M_CRASH_DATA_RAM_SIZE = 0x100;
|
|||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
|
||||
RAM (rwx) : ORIGIN = 0x20000298, LENGTH = 128K - 0x298
|
||||
DTCMRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
|
||||
RAM (xrw) : ORIGIN = 0x24000298, LENGTH = 512K - 0x298 /* end = 0x24080000 */
|
||||
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
|
||||
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
|
||||
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
|
||||
}
|
||||
|
||||
/* Linker script to place sections and symbol values. Should be used together
|
||||
|
@ -180,4 +184,19 @@ SECTIONS
|
|||
|
||||
/* Check if data + heap + stack exceeds RAM limit */
|
||||
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
|
||||
|
||||
.lwip_sec (NOLOAD) : {
|
||||
. = ABSOLUTE(0x30040000);
|
||||
*(.RxDecripSection)
|
||||
|
||||
. = ABSOLUTE(0x30040100);
|
||||
*(.TxDecripSection)
|
||||
|
||||
. = ABSOLUTE(0x30040400);
|
||||
*(.RxArraySection)
|
||||
|
||||
. = ABSOLUTE(0x30044000);
|
||||
*(.ethusbram)
|
||||
|
||||
} >RAM_D2 AT> FLASH
|
||||
}
|
||||
|
|
|
@ -7,15 +7,15 @@ define symbol __intvec_start__ = MBED_APP_START;
|
|||
define symbol __region_ROM_start__ = MBED_APP_START;
|
||||
define symbol __region_ROM_end__ = MBED_APP_START + MBED_APP_SIZE - 1;
|
||||
|
||||
// 128KB DTCM RAM (0x20000)
|
||||
// 512KB RAM (0x80000)
|
||||
// Vector table dynamic copy: 166 vectors = 664 bytes (0x298) reserved
|
||||
// Crash data area: 256 bytes (0x100) reserved
|
||||
define symbol __NVIC_start__ = 0x20000000;
|
||||
define symbol __NVIC_end__ = 0x20000297;
|
||||
define symbol __region_CRASH_DATA_RAM_start__ = 0x20000298; // Aligned on 8 bytes
|
||||
define symbol __region_CRASH_DATA_RAM_end__ = 0x20000397;
|
||||
define symbol __region_RAM_start__ = 0x20000398; // Aligned on 8 bytes
|
||||
define symbol __region_RAM_end__ = 0x20000000 + 0x20000 - 1;
|
||||
define symbol __NVIC_start__ = 0x24000000;
|
||||
define symbol __NVIC_end__ = 0x24000297;
|
||||
define symbol __region_CRASH_DATA_RAM_start__ = 0x24000298; // Aligned on 8 bytes
|
||||
define symbol __region_CRASH_DATA_RAM_end__ = 0x24000397;
|
||||
define symbol __region_RAM_start__ = 0x24000398; // Aligned on 8 bytes
|
||||
define symbol __region_RAM_end__ = 0x24000000 + 0x80000 - 1;
|
||||
|
||||
// Memory regions
|
||||
define memory mem with size = 4G;
|
||||
|
@ -23,6 +23,10 @@ define region ROM_region = mem:[from __region_ROM_start__ to __region_ROM_end__]
|
|||
define region RAM_region = mem:[from __region_RAM_start__ to __region_RAM_end__];
|
||||
define region CRASH_DATA_RAM_region = mem:[from __region_CRASH_DATA_RAM_start__ to __region_CRASH_DATA_RAM_end__];
|
||||
|
||||
// Memory region used for ethernet
|
||||
define region eth_mem_region = mem:[from 0x30044000 to 0x30048000 ];
|
||||
place in eth_mem_region { section .ethusbram };
|
||||
|
||||
// Crash data symbols
|
||||
define exported symbol __CRASH_DATA_RAM_START__ = __region_CRASH_DATA_RAM_start__;
|
||||
define exported symbol __CRASH_DATA_RAM_END__ = __region_CRASH_DATA_RAM_end__;
|
||||
|
|
Loading…
Reference in New Issue