2016-05-18 08:18 AM
Hello,
I'm using an STM32F373C-EVAL and both the Atollic and AC6 IDE tool. When I try to import a project from the STM32CubeF3 V1.4.0 into both the IDE, I get a hardfault error during the __libc_init_array branch instruction. However, if I create a new project from scratch using the STM32CubeMX, I have no problem. What could be the problem? #libc_init_array2016-05-18 03:56 PM
Do you use C++, do you have a list of constructors to be initialized?
Review the startup file and linker script, with a merge/diff tool if required, and identify what is being initialized differently. Review the .MAP files if that helps, and any command line options passed to the compiler/linker from the makefile.What is the address of __libc_init_array? Are you linking against the correct Thumb based library?2018-12-19 06:12 AM
I had this same problem as well but with SW4STM32. I found that I needed to add:
-specs=nosys.specs -specs=nano.specs
to the Linker Flags
2018-12-19 06:36 AM
Perhaps you have copied startup files from one project to another ?
The startup code is quite toolchain specific and tailored to the libs provided by the toolchain, even if they look similar, and use similar/same labels.