The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
Diff: TARGET_NUCLEO_F429ZI/TOOLCHAIN_GCC_ARM/STM32F429xI.ld
- Revision:
- 172:65be27845400
- Parent:
- 171:3a7713b1edbc
--- a/TARGET_NUCLEO_F429ZI/TOOLCHAIN_GCC_ARM/STM32F429xI.ld Thu Nov 08 11:45:42 2018 +0000 +++ b/TARGET_NUCLEO_F429ZI/TOOLCHAIN_GCC_ARM/STM32F429xI.ld Wed Feb 20 20:53:29 2019 +0000 @@ -1,11 +1,3 @@ -M_VECTOR_RAM_SIZE = 0x400; - -/* With the RTOS in use, this does not affect the main stack size. The size of - * the stack where main runs is determined via the RTOS. */ -STACK_SIZE = 0x400; - -HEAP_SIZE = 0x6000; - #if !defined(MBED_APP_START) #define MBED_APP_START 0x08000000 #endif @@ -14,13 +6,15 @@ #define MBED_APP_SIZE 2048k #endif -/* Specify the memory areas */ +M_CRASH_DATA_RAM_SIZE = 0x100; + +/* Linker script to configure memory regions. */ +/* 0x1AC resevered for vectors; 8-byte aligned = 0x1B0 (0x1AC + 0x4)*/ MEMORY -{ - VECTORS (rx) : ORIGIN = MBED_APP_START, LENGTH = 0x400 - FLASH (rx) : ORIGIN = MBED_APP_START + 0x400, LENGTH = MBED_APP_SIZE - 0x400 - CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 192k +{ + FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE + CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K + RAM (rwx) : ORIGIN = 0x200001B0, LENGTH = 192k - (0x1AC+0x4) } /* Linker script to place sections and symbol values. Should be used together @@ -54,18 +48,10 @@ SECTIONS { - .isr_vector : - { - __vector_table = .; - KEEP(*(.isr_vector)) - . = ALIGN(8); - } > VECTORS - .text : { - + KEEP(*(.isr_vector)) *(.text*) - KEEP(*(.init)) KEEP(*(.fini)) @@ -94,7 +80,6 @@ } > FLASH __exidx_start = .; - .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) @@ -103,23 +88,21 @@ __etext = .; _sidata = .; - - .interrupts_ram : + + .crash_data_ram : { . = ALIGN(8); - __VECTOR_RAM__ = .; - __interrupts_ram_start__ = .; /* Create a global symbol at data start */ - *(.m_interrupts_ram) /* This is a user defined section */ - . += M_VECTOR_RAM_SIZE; + __CRASH_DATA_RAM__ = .; + __CRASH_DATA_RAM_START__ = .; /* Create a global symbol at data start */ + KEEP(*(.keep.crash_data_ram)) + *(.m_crash_data_ram) /* This is a user defined section */ + . += M_CRASH_DATA_RAM_SIZE; . = ALIGN(8); - __interrupts_ram_end__ = .; /* Define a global symbol at data end */ - } > RAM - + __CRASH_DATA_RAM_END__ = .; /* Define a global symbol at data end */ + } > RAM - .data : + .data : AT (__etext) { - PROVIDE( __etext = LOADADDR(.data) ); - __data_start__ = .; _sdata = .; *(vtable) @@ -152,23 +135,9 @@ __data_end__ = .; _edata = .; - } > RAM AT > FLASH - - - /* Uninitialized data section - * This region is not initialized by the C/C++ library and can be used to - * store state across soft reboots. */ - .uninitialized (NOLOAD): - { - . = ALIGN(32); - __uninitialized_start = .; - *(.uninitialized) - KEEP(*(.keep.uninitialized)) - . = ALIGN(32); - __uninitialized_end = .; } > RAM - .bss (NOLOAD): + .bss : { . = ALIGN(8); __bss_start__ = .; @@ -180,18 +149,29 @@ _ebss = .; } > RAM - .heap (NOLOAD): + .heap (COPY): { __end__ = .; end = __end__; - . += HEAP_SIZE; + *(.heap*) __HeapLimit = .; } > RAM - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __stack = __StackTop; - __StackLimit = __StackTop - STACK_SIZE; + /* .stack_dummy section doesn't contains any symbols. It is only + * used for linker to calculate size of stack sections, and assign + * values to stack symbols later */ + .stack_dummy (COPY): + { + *(.stack*) + } > RAM - ASSERT(__StackLimit >= __HeapLimit, "Region RAM overflowed with stack and heap") + /* Set stack top to end of RAM, and stack limit move down by + * size of stack_dummy section */ + __StackTop = ORIGIN(RAM) + LENGTH(RAM); + _estack = __StackTop; + __StackLimit = __StackTop - SIZEOF(.stack_dummy); + PROVIDE(__stack = __StackTop); + /* Check if data + heap + stack exceeds RAM limit */ + ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") }