This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Memory related issue with MCU startup ( __libc_init_array )

Dear Community,

I am developing firmware for STM32l476VGT using Gnu Make Builder and "Ac6 STM32 MCU GCC" Toolchain. I encounter a memory related run time error during the startup (before main) of my controller. The error occurs during the execution of the LoopFillZeroBss section:

After the execution of  bl __libc_init_array I end up in the Infinite_Loop of  the Default_Handler. It is worth noting, that this error can be influenced by the amount memory which is statically allocated. In my source code file there is an array

If SIZE is smaller than threshold1, I can enter main() without any problems. If SIZE is between threshold1 and threshold2 (with threshold1 < threshold2) then the behaviour is as described above. If SIZE exceeds threshold2, a linker error (section '.bss' will not fit in region 'RAM') is generated (as expected).

I have the following questions:

1. What exactly happens, when 'bl __libc_init_array' is executed?

2. How could the fail of this command possibly related to the memory usage?

Any thoughts or helpful sources on this topic would be greatly appreciated as well.

Kind regards

Oliver

0