diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/TOOLCHAIN_GCC_ARM/NUCLEO_F030R8.ld b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/TOOLCHAIN_GCC_ARM/NUCLEO_F030R8.ld index 72a5821c90..76dae312cb 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/TOOLCHAIN_GCC_ARM/NUCLEO_F030R8.ld +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/TOOLCHAIN_GCC_ARM/NUCLEO_F030R8.ld @@ -40,7 +40,6 @@ SECTIONS { KEEP(*(.isr_vector)) *(.text*) - KEEP(*(.init)) KEEP(*(.fini)) @@ -63,7 +62,7 @@ SECTIONS KEEP(*(.eh_frame*)) } > FLASH - .ARM.extab : + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } > FLASH @@ -76,12 +75,12 @@ SECTIONS __exidx_end = .; __etext = .; - _sidata = .; - + _sidata = .; + .data : AT (__etext) { __data_start__ = .; - _sdata = .; + _sdata = .; *(vtable) *(.data*) @@ -110,7 +109,7 @@ SECTIONS . = ALIGN(4); /* All data end */ __data_end__ = .; - _edata = .; + _edata = .; } > RAM @@ -118,14 +117,14 @@ SECTIONS { . = ALIGN(4); __bss_start__ = .; - _sbss = .; + _sbss = .; *(.bss*) *(COMMON) . = ALIGN(4); __bss_end__ = .; - _ebss = .; + _ebss = .; } > RAM - + .heap (COPY): { __end__ = .; @@ -145,11 +144,10 @@ SECTIONS /* 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; + _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") } - diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/TOOLCHAIN_GCC_ARM/NUCLEO_F072RB.ld b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/TOOLCHAIN_GCC_ARM/NUCLEO_F072RB.ld index 26e13db466..137d809714 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/TOOLCHAIN_GCC_ARM/NUCLEO_F072RB.ld +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/TOOLCHAIN_GCC_ARM/NUCLEO_F072RB.ld @@ -40,7 +40,6 @@ SECTIONS { KEEP(*(.isr_vector)) *(.text*) - KEEP(*(.init)) KEEP(*(.fini)) @@ -63,7 +62,7 @@ SECTIONS KEEP(*(.eh_frame*)) } > FLASH - .ARM.extab : + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } > FLASH @@ -76,12 +75,12 @@ SECTIONS __exidx_end = .; __etext = .; - _sidata = .; - + _sidata = .; + .data : AT (__etext) { __data_start__ = .; - _sdata = .; + _sdata = .; *(vtable) *(.data*) @@ -110,7 +109,7 @@ SECTIONS . = ALIGN(4); /* All data end */ __data_end__ = .; - _edata = .; + _edata = .; } > RAM @@ -118,14 +117,14 @@ SECTIONS { . = ALIGN(4); __bss_start__ = .; - _sbss = .; + _sbss = .; *(.bss*) *(COMMON) . = ALIGN(4); __bss_end__ = .; - _ebss = .; + _ebss = .; } > RAM - + .heap (COPY): { __end__ = .; @@ -145,11 +144,10 @@ SECTIONS /* 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; + _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") } -