diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/TOOLCHAIN_GCC_ARM/STM32L476XX.ld b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/TOOLCHAIN_GCC_ARM/STM32L476XX.ld index 185298a993..3d73c57997 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/TOOLCHAIN_GCC_ARM/STM32L476XX.ld +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/TOOLCHAIN_GCC_ARM/STM32L476XX.ld @@ -2,8 +2,8 @@ MEMORY { FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K - RAM (rwx) : ORIGIN = 0x10000188, LENGTH = 32k - 0x188 - RAM2 (rwx) : ORIGIN = 0x20000000, LENGTH = 96k + SRAM2 (rwx) : ORIGIN = 0x10000188, LENGTH = 32k - 0x188 + SRAM1 (rwx) : ORIGIN = 0x20000000, LENGTH = 96k } /* Linker script to place sections and symbol values. Should be used together @@ -112,7 +112,7 @@ SECTIONS __data_end__ = .; _edata = .; - } > RAM + } > SRAM2 .bss : { @@ -124,7 +124,7 @@ SECTIONS . = ALIGN(4); __bss_end__ = .; _ebss = .; - } > RAM + } > SRAM2 .heap (COPY): { @@ -132,7 +132,7 @@ SECTIONS end = __end__; *(.heap*) __HeapLimit = .; - } > RAM + } > SRAM2 /* .stack_dummy section doesn't contains any symbols. It is only * used for linker to calculate size of stack sections, and assign @@ -140,11 +140,11 @@ SECTIONS .stack_dummy (COPY): { *(.stack*) - } > RAM + } > SRAM2 /* Set stack top to end of RAM, and stack limit move down by * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackTop = ORIGIN(SRAM2) + LENGTH(SRAM2); _estack = __StackTop; __StackLimit = __StackTop - SIZEOF(.stack_dummy); PROVIDE(__stack = __StackTop); diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/TOOLCHAIN_IAR/stm32l476xx.icf b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/TOOLCHAIN_IAR/stm32l476xx.icf index b3c17a2695..9571587029 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/TOOLCHAIN_IAR/stm32l476xx.icf +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/TOOLCHAIN_IAR/stm32l476xx.icf @@ -7,16 +7,16 @@ define symbol __region_ROM_end__ = 0x080FFFFF; /* Vector table dynamic copy: Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM */ define symbol __NVIC_start__ = 0x10000000; define symbol __NVIC_end__ = 0x10000187; /* Aligned on 8 bytes (392 = 49 x 8) */ -define symbol __region_RAM_start__ = 0x10000188; -define symbol __region_RAM_end__ = 0x10007FFF; -define symbol __region_SRAM2_start__ = 0x20000000; -define symbol __region_SRAM2_end__ = 0x20017FFF; +define symbol __region_SRAM2_start__ = 0x10000188; +define symbol __region_SRAM2_end__ = 0x10007FFF; +define symbol __region_SRAM1_start__ = 0x20000000; +define symbol __region_SRAM1_end__ = 0x20017FFF; /* Memory regions */ define memory mem with size = 4G; 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 SRAM2_region = mem:[from __region_SRAM2_start__ to __region_SRAM2_end__]; +define region SRAM1_region = mem:[from __region_SRAM1_start__ to __region_SRAM1_end__]; /* Stack 1/8 and Heap 1/4 of RAM */ define symbol __size_cstack__ = 0x4000; @@ -31,5 +31,5 @@ do not initialize { section .noinit }; place at address mem:__intvec_start__ { readonly section .intvec }; place in ROM_region { readonly }; -place in RAM_region { readwrite, block STACKHEAP }; -place in SRAM2_region { }; +place in SRAM2_region { readwrite, block STACKHEAP }; +place in SRAM1_region { }; diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/TOOLCHAIN_GCC_ARM/STM32L476XX.ld b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/TOOLCHAIN_GCC_ARM/STM32L476XX.ld index 185298a993..3d73c57997 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/TOOLCHAIN_GCC_ARM/STM32L476XX.ld +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/TOOLCHAIN_GCC_ARM/STM32L476XX.ld @@ -2,8 +2,8 @@ MEMORY { FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K - RAM (rwx) : ORIGIN = 0x10000188, LENGTH = 32k - 0x188 - RAM2 (rwx) : ORIGIN = 0x20000000, LENGTH = 96k + SRAM2 (rwx) : ORIGIN = 0x10000188, LENGTH = 32k - 0x188 + SRAM1 (rwx) : ORIGIN = 0x20000000, LENGTH = 96k } /* Linker script to place sections and symbol values. Should be used together @@ -112,7 +112,7 @@ SECTIONS __data_end__ = .; _edata = .; - } > RAM + } > SRAM2 .bss : { @@ -124,7 +124,7 @@ SECTIONS . = ALIGN(4); __bss_end__ = .; _ebss = .; - } > RAM + } > SRAM2 .heap (COPY): { @@ -132,7 +132,7 @@ SECTIONS end = __end__; *(.heap*) __HeapLimit = .; - } > RAM + } > SRAM2 /* .stack_dummy section doesn't contains any symbols. It is only * used for linker to calculate size of stack sections, and assign @@ -140,11 +140,11 @@ SECTIONS .stack_dummy (COPY): { *(.stack*) - } > RAM + } > SRAM2 /* Set stack top to end of RAM, and stack limit move down by * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); + __StackTop = ORIGIN(SRAM2) + LENGTH(SRAM2); _estack = __StackTop; __StackLimit = __StackTop - SIZEOF(.stack_dummy); PROVIDE(__stack = __StackTop); diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/TOOLCHAIN_IAR/stm32l476xx.icf b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/TOOLCHAIN_IAR/stm32l476xx.icf index b3c17a2695..9571587029 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/TOOLCHAIN_IAR/stm32l476xx.icf +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/TOOLCHAIN_IAR/stm32l476xx.icf @@ -7,16 +7,16 @@ define symbol __region_ROM_end__ = 0x080FFFFF; /* Vector table dynamic copy: Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM */ define symbol __NVIC_start__ = 0x10000000; define symbol __NVIC_end__ = 0x10000187; /* Aligned on 8 bytes (392 = 49 x 8) */ -define symbol __region_RAM_start__ = 0x10000188; -define symbol __region_RAM_end__ = 0x10007FFF; -define symbol __region_SRAM2_start__ = 0x20000000; -define symbol __region_SRAM2_end__ = 0x20017FFF; +define symbol __region_SRAM2_start__ = 0x10000188; +define symbol __region_SRAM2_end__ = 0x10007FFF; +define symbol __region_SRAM1_start__ = 0x20000000; +define symbol __region_SRAM1_end__ = 0x20017FFF; /* Memory regions */ define memory mem with size = 4G; 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 SRAM2_region = mem:[from __region_SRAM2_start__ to __region_SRAM2_end__]; +define region SRAM1_region = mem:[from __region_SRAM1_start__ to __region_SRAM1_end__]; /* Stack 1/8 and Heap 1/4 of RAM */ define symbol __size_cstack__ = 0x4000; @@ -31,5 +31,5 @@ do not initialize { section .noinit }; place at address mem:__intvec_start__ { readonly section .intvec }; place in ROM_region { readonly }; -place in RAM_region { readwrite, block STACKHEAP }; -place in SRAM2_region { }; +place in SRAM2_region { readwrite, block STACKHEAP }; +place in SRAM1_region { };