diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/TOOLCHAIN_ARM_MICRO/startup_stm32l476xx.s b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/TOOLCHAIN_ARM_MICRO/startup_stm32l476xx.s index 919f1d969e1..fba5efee895 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/TOOLCHAIN_ARM_MICRO/startup_stm32l476xx.s +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/TOOLCHAIN_ARM_MICRO/startup_stm32l476xx.s @@ -39,18 +39,8 @@ ; ;******************************************************************************* -; Amount of memory (in bytes) allocated for Stack -; Tailor this value to your application needs -; Stack Configuration -; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Stack_Size EQU 0x00000400 - AREA STACK, NOINIT, READWRITE, ALIGN=3 EXPORT __initial_sp - -Stack_Mem SPACE Stack_Size __initial_sp EQU 0x10008000 ; Top of RAM, L4-ECC-SRAM2 retained in standby @@ -58,7 +48,7 @@ __initial_sp EQU 0x10008000 ; Top of RAM, L4-ECC-SRAM2 retained in standb ; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; -Heap_Size EQU 0x00000400 +Heap_Size EQU 0x8000 ; 32KB AREA HEAP, NOINIT, READWRITE, ALIGN=3 EXPORT __heap_base @@ -66,12 +56,11 @@ Heap_Size EQU 0x00000400 __heap_base Heap_Mem SPACE Heap_Size -__heap_limit EQU (__initial_sp - Stack_Size) +__heap_limit PRESERVE8 THUMB - ; Vector Table Mapped to Address 0 at Reset AREA RESET, DATA, READONLY EXPORT __Vectors @@ -415,3 +404,4 @@ FPU_IRQHandler END ;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE***** + diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/cmsis_nvic.c b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/cmsis_nvic.c index 9263c748e78..a8a6a487a54 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/cmsis_nvic.c +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/cmsis_nvic.c @@ -30,7 +30,7 @@ */ #include "cmsis_nvic.h" -#define NVIC_RAM_VECTOR_ADDRESS (0x20000000) // Vectors positioned at start of RAM +#define NVIC_RAM_VECTOR_ADDRESS (0x10000000) // Vectors positioned at start of SRAM2 #define NVIC_FLASH_VECTOR_ADDRESS (0x08000000) // Initial vector position in flash void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) { diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/TOOLCHAIN_ARM_MICRO/startup_stm32l476xx.s b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/TOOLCHAIN_ARM_MICRO/startup_stm32l476xx.s index 919f1d969e1..fba5efee895 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/TOOLCHAIN_ARM_MICRO/startup_stm32l476xx.s +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/TOOLCHAIN_ARM_MICRO/startup_stm32l476xx.s @@ -39,18 +39,8 @@ ; ;******************************************************************************* -; Amount of memory (in bytes) allocated for Stack -; Tailor this value to your application needs -; Stack Configuration -; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> -; - -Stack_Size EQU 0x00000400 - AREA STACK, NOINIT, READWRITE, ALIGN=3 EXPORT __initial_sp - -Stack_Mem SPACE Stack_Size __initial_sp EQU 0x10008000 ; Top of RAM, L4-ECC-SRAM2 retained in standby @@ -58,7 +48,7 @@ __initial_sp EQU 0x10008000 ; Top of RAM, L4-ECC-SRAM2 retained in standb ; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; -Heap_Size EQU 0x00000400 +Heap_Size EQU 0x8000 ; 32KB AREA HEAP, NOINIT, READWRITE, ALIGN=3 EXPORT __heap_base @@ -66,12 +56,11 @@ Heap_Size EQU 0x00000400 __heap_base Heap_Mem SPACE Heap_Size -__heap_limit EQU (__initial_sp - Stack_Size) +__heap_limit PRESERVE8 THUMB - ; Vector Table Mapped to Address 0 at Reset AREA RESET, DATA, READONLY EXPORT __Vectors @@ -415,3 +404,4 @@ FPU_IRQHandler END ;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE***** + diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/cmsis_nvic.c b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/cmsis_nvic.c index 9263c748e78..a8a6a487a54 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/cmsis_nvic.c +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/cmsis_nvic.c @@ -30,7 +30,7 @@ */ #include "cmsis_nvic.h" -#define NVIC_RAM_VECTOR_ADDRESS (0x20000000) // Vectors positioned at start of RAM +#define NVIC_RAM_VECTOR_ADDRESS (0x10000000) // Vectors positioned at start of SRAM2 #define NVIC_FLASH_VECTOR_ADDRESS (0x08000000) // Initial vector position in flash void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {