Hi Stan, Thank you for your reply.
I was using Lauterbach Trace32 for debugging but the license recently expired and that is why I am trying to debug the code with S32 and PEMicro debugger. I had already tried the first 2 links that you shared.
But my observation was that the source level debugging of ghs compiled code with S32 brings issues so currently I am trying new approach. Previously I was compiling the code separately and trying to debug in S32 but now I have installed ghs ppc plugin in S32 and added my project there. Now I am trying to compile the code from S32 using my licensed ghs compiler by making some configurations. If it compiles, will this allow me to debug source code completely without any issue?