Program execution gets to void _exit (int status). I am unable to prevent that or find what line causes this to happen.
So somehow through my chain of execution I end up here
void _exit (int status)
{
_kill(status, -1);
while (1) {} /* Make sure we hang here */
}
From disassembly it seems that the functions preceeding it are
ITM_SendChar()
and before that
HAL_CAN_RxFifo1MsgPendingCallback()
I do use HAL_CAN_RxFifo1MsgPendingCallback(), but following in from there I do not know how it ends up in ITM_SendChar nor how does this lead to the _exit() function.
I've had errros before with HardFaultHandler(), but never ended up in _exit() and not sure how to proceed.
I am using TrueStudio, I started using it over Keil as it seemed to be better at dynamic printf and array display. It does show some issues as at 2,000,000 bps it drops bytes in between DMA transfers while the same code in Keil wouldn't.
Toolchain: Atollic ARM Tools
Probe: ST_Link
Optimisation: None (-O0)
Debugging: Maximum (-g3)
MCU: STM32F407
