From 9e334a6b4a05b74059f4c37e3815d195ccd4691a Mon Sep 17 00:00:00 2001 From: jeromecoutant Date: Fri, 21 Jul 2017 14:45:22 +0200 Subject: [PATCH] NUCLEO_F767ZI : boot issue with GCC --- .../TOOLCHAIN_GCC_ARM/startup_stm32f767xx.S | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/device/TOOLCHAIN_GCC_ARM/startup_stm32f767xx.S b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/device/TOOLCHAIN_GCC_ARM/startup_stm32f767xx.S index 252c014f77..5e4fcee730 100644 --- a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/device/TOOLCHAIN_GCC_ARM/startup_stm32f767xx.S +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/device/TOOLCHAIN_GCC_ARM/startup_stm32f767xx.S @@ -58,10 +58,6 @@ defined in linker script */ .word _sdata /* end address for the .data section. defined in linker script */ .word _edata -/* start address for the .bss section. defined in linker script */ -.word _sbss -/* end address for the .bss section. defined in linker script */ -.word _ebss /* stack used for SystemInit_ExtMemCtl; always internal RAM used */ /** @@ -95,24 +91,18 @@ LoopCopyDataInit: adds r2, r0, r1 cmp r2, r3 bcc CopyDataInit - ldr r2, =_sbss - b LoopFillZerobss -/* Zero fill the bss segment. */ -FillZerobss: - movs r3, #0 - str r3, [r2], #4 - -LoopFillZerobss: - ldr r3, = _ebss - cmp r2, r3 - bcc FillZerobss /* Call the clock system initialization function.*/ bl SystemInit /* Call static constructors */ - bl __libc_init_array + //bl __libc_init_array /* Call the application's entry point.*/ - bl main + //bl main + // Calling the crt0 'cold-start' entry point. There __libc_init_array is called + // and when existing hardware_init_hook() and software_init_hook() before + // starting main(). software_init_hook() is available and has to be called due + // to initializsation when using rtos. + bl _start bx lr .size Reset_Handler, .-Reset_Handler