If I flash the application with SEC, it runs fine. If I connect with J-Link commander, I can halt and go successfully.
In the IDE, today I can set a breakpoint at ResetISR(). If I step over SystemInit(), it crashes. If I step into SystemInit(), step through the function and then step over SystemInitHook(), it crashes. If I do the same and step into SystemInitHook(), it does not crash. This is what I mean when I say the behaviour depends on whether the debugger is stepping over or into the code.
An example of the stack when it crashes:
Thread #1 57005 (Suspended : Signal : SIGTRAP:Trace/breakpoint trap)
_vfprintf_r() at 0x600134a4
0x0
So it looks like it's jumping to 0x0, but only when the code is freely running, not when stepping in the debugger. There is no code at 0x0 - the ITC is not being used.
Just to repeat, this is before main(), long before any RTOS or similar is invoked. It's crashing in the initial startup code.