My code:
test_class::test_class() { // TODO Auto-generated constructor stub TRACE_USER("Constructor called"); HAL_LedOn(HAL_LED_2); } test_class tt;
So class constructor is called from
.init6:
Unused for C programs, but used for constructors in C++ programs.
I registered my pre-init debug functions at
.init5:
Unused. User definable.
void preinitDebugs (void) __attribute__ ((naked)) __attribute__ ((section (".init5"))); void preinitDebugs (void) { SYS_PreInitDebugs(); }
And if I am calling TRACE_USER function inside of the preinitDebugs - it works fine.
If I call it from constructor - it hangs my CPU.
For deeper check I also disabled
void HAL_UartWriteByte(uint8_t byte)
for the time of calling Cpp constructors - but it still hangs - so there is not an uart problem
Any ideas ?