Hi,
I've resolved the stuck SVC 0 error and hard faults. I also found out why local debugging via USB in MCUXpresso works, while the same setup through LinkServer does not.
The local configuration performs a hard reset every time the firmware is uploaded. I couldn’t find a way to do the same with LinkServer, so before each flash, I power-cycle the PSU via LXI.
I also found and fixed another strange issue. This project is also ported to CLion, where I use a .gdbinit file for flashing the firmware. Initially, I used the load command, but it didn’t work as expected — the firmware was flashed, but execution would get stuck in unusual places.
When using LinkServer, I had to manually stop execution, run load, and then continue from the GDB console for it to work properly. So I tried OpenOCD instead, and it worked as expected — the load command in .gdbinit worked correctly without any extra steps.