Hello,
I set up S32DS with the NXP Debug Probe, but I work with a custom S32G2 based board and I'm experiencing issues while trying to debug code.
The code is AutoSAR based application running on M7 core and the board has primary QSPI wired to channel B instead of channel A, like I described in the other thread:
Debug probe + S32DS: not possible to flash QSPI B chip
but I don't think QSPI wiring is related to the issue I'm going to describe.
In general, I can "somewhat" debug the code, step through the code and change variables' values etc., however not for long and only in serial boot mode. But this way I'm sure that my Debug Probe + S32DS + debug configuration is proper. So I'd like to describe 3 different debugging scenarios which should highlight the issues I'm facing. I'm also attaching gdb console logs for each of these scenarios.
1. Debugging in serial boot mode
The ELF file is flashed successfully to the target and by default the debugging session stops in the main() function. From here I can step through the code and change variables' values etc. I can debug the code to the point where the Os and BswM have started as I can stop debugging in my SWC's init and cyclic runnables. The cyclic runnable period is 100ms, I resume debugging c.a. 20 times, then when I remove the breakpoint and resume again, the debug session terminates or I get "Interrupt failed" error or I end up in ErrorHook() handler.

I'm not particularly interested in the debugging issues here, because serial boot mode is not the proper one for debugging. It only shows that my Debug Probe, IDE and debug configuration is properly set up for debugging.
2. Normal mode
In normal mode the debug session doesn't even start because the Debug Probe fails to flash the ELF file with "ccs:Bus error" and "ccs:Core disabled" errors. See attached gdb log for details.
3. Start debugging session in serial boot, resume in normal mode
In this scenario I can only debug the application in the early init phase, up to the point where Os calls Os_ThreadInit() inside Os_HookCallOs_CoreInitHook(). The debug session is still active, I can suspend and resume, but alway end up in the same line of Os_HookCallOs_CoreInitHook().
We have a working Lauterbach setup which allows us to flash QSPI B and debug the code. Based on that I adapted S32DS debugger's python scripts for flashing as described in mentioned thread - this allowed me to flash QSPI B chip with NXP Debug Probe. But further efforts to adapt debug settings didn't bring any results. But I belive the issue here is the proper board configuration for debugging. We also have PMIC's WDG debugging mode to prevent unexpected WDG resets that might interfere with the debugger.
I noticed that the Lauterbach script for flashing and S32DS debugger's python script for flashing are basically 1 to 1 implementation, so I guess debugging configuration script could be adapted to work with the custom board as well.
Could you possibly provide such Lauterbach equivalent for S32DS ?
Best regards
Michal