From 1bc8e0d6c1faf077d134abe43f61a0b41cdd4033 Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Fri, 31 Jul 2015 16:06:08 +0200 Subject: [PATCH] Added main stack painting for STM32F4 --- .../Templates/gcc_ride7/startup_stm32f40_41xxx.s | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/radio/src/thirdparty/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f40_41xxx.s b/radio/src/thirdparty/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f40_41xxx.s index 1463eb9b2..4fb8604f7 100644 --- a/radio/src/thirdparty/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f40_41xxx.s +++ b/radio/src/thirdparty/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f40_41xxx.s @@ -99,6 +99,16 @@ LoopFillZerobss: cmp r2, r3 bcc FillZerobss +/*Paint Main Stack */ + ldr r2, = _main_stack_start +PaintMainStack: + movs r3, #0x55555555 + str r3, [r2], #4 +LoopPaintMainStack: + ldr r3, = _estack + cmp r2, r3 + bcc PaintMainStack + /* Call the clock system intitialization function.*/ bl SystemInit /* Call C++ constructors for static objects */