get a moduleProbably execution hit one of the exception handlers. It is easier to use JTAG then LEDs to debug when running out of the debugger.
Before you try to debug this as described below, please run the unmodified example on unmodified standard BSP, as described above. If you will be able to single out what change cases crash it will greatly simplify further debugging.
You can check it by putting breakpoints at customizeErrorHandler() and on entry of all exception handlers in init.s (init.arm) file (Undefined_Handler, SWI_Handler Prefetch_Handler, Abort_Handler, Address_Error_Handler, crash). Once you will get an exception , you will hit one of those breakpoints and you will know what exception did you get. Once this happens, look at the link register (LR) - go to the instruction that is on address pointed by the LR - you may have to switch to mixed mode where both C and assembly language instructions are displayed. Once you there, put a breakpoint on the previous instruction – this is the line that caused look and try to figure what this instruction is doing. If it is not HW exception, you can look at the call stack when you hit your breakpoint at customizeExceptionHandler() and see how you got there.
You can put breakpoint in inti.arm – use DIGI ESP debugger’s console (it’s a regular gdb console actually and it accepts regular gdb commands)
etc to set breakpoints
with JTAG and reproduce a problem there: