Debugging AUTOSAR based source code in S32|using GHS compiler for PPC Architecture on MPC574xR

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Debugging AUTOSAR based source code in S32|using GHS compiler for PPC Architecture on MPC574xR

跳至解决方案
906 次查看
Rasikas2
Contributor I

I have a AUTOSAR based source code which is compiled using GHS compiler for PPC architecture. I flashed the elf using Lauterbach debugger and Trace32 Software. The debugging was also done in Trace32. Target hardware is MPC574xR

Now I want to shift to S32 tool and PE Micro debugger but the code will still compiler using GHS compiler. I am able to flash the elf but unable to debug the code in S32 as only main.c file is visible instead if the complete source code.

To update debug configurations I have followed both option 1 and 2 from NXP documentation https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/HOWTO-download-separate-elf-srec-hex-f...

I have made sure that debug information and symbols are present and there is no optimization. The compilation and flashing is carried out on the same system so no issues with wrong compilation path.

Can anyone suggest what could be going wrong?

0 项奖励
回复
1 解答
704 次查看
stanish
NXP Employee
NXP Employee

Hi,

The officialy supported debugger for S32DS + GHS is Lauterbach:

https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/HOWTO-Install-Lauterbach-TRACE32-debug...

See below the instructions to integrate GHS Ecliplse plugin into S32 Design Studio

https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/HOWTO-Install-GHS-Compiler-Plugin/ta-p...

There is an alternative way to debug GHS generated elf in S32DS environment.  But it has some limitations (please see the folowing post)

https://community.nxp.com/t5/S32-Design-Studio/5744P-S32-Design-Studio-include-Green-Hills-Compiler-...

Please make sure to re-build the project before debugging. If the project consist of libraries, you may not be able to debug them on the source-level unless you rebuild them too.

 

Hope it helps.

Stan

在原帖中查看解决方案

0 项奖励
回复
3 回复数
705 次查看
stanish
NXP Employee
NXP Employee

Hi,

The officialy supported debugger for S32DS + GHS is Lauterbach:

https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/HOWTO-Install-Lauterbach-TRACE32-debug...

See below the instructions to integrate GHS Ecliplse plugin into S32 Design Studio

https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/HOWTO-Install-GHS-Compiler-Plugin/ta-p...

There is an alternative way to debug GHS generated elf in S32DS environment.  But it has some limitations (please see the folowing post)

https://community.nxp.com/t5/S32-Design-Studio/5744P-S32-Design-Studio-include-Green-Hills-Compiler-...

Please make sure to re-build the project before debugging. If the project consist of libraries, you may not be able to debug them on the source-level unless you rebuild them too.

 

Hope it helps.

Stan

0 项奖励
回复
700 次查看
Rasikas2
Contributor I

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?

0 项奖励
回复
843 次查看
petervlna
NXP TechSupport
NXP TechSupport

Hello,

The GHS elf is not very much compatible with gcc debugger and has limitations. Some things are not working properly.

Can anyone suggest what could be going wrong?

I do not expect there is anything wrong on your side, just the limitation of compatibility makes issues.

S32DS was build for GCC compiler and GHS added support was not its primary usecase.

Best regards,

Peter

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2136562%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9C%A8%20S32%20%E4%B8%AD%E8%B0%83%E8%AF%95%E5%9F%BA%E4%BA%8E%20AUTOSAR%20%E7%9A%84%E6%BA%90%E4%BB%A3%E7%A0%81%7C%E5%9C%A8%20MPC574xR%20%E4%B8%8A%E4%BD%BF%E7%94%A8%E9%92%88%E5%AF%B9%20PPC%20%E6%9E%B6%E6%9E%84%E7%9A%84%20GHS%20%E7%BC%96%E8%AF%91%E5%99%A8%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2136562%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%88%91%E6%9C%89%E4%B8%80%E4%B8%AA%E5%9F%BA%E4%BA%8E%20AUTOSAR%20%E7%9A%84%E6%BA%90%E4%BB%A3%E7%A0%81%EF%BC%8C%E5%AE%83%E6%98%AF%E4%BD%BF%E7%94%A8%20PPC%20%E6%9E%B6%E6%9E%84%E7%9A%84%20GHS%20%E7%BC%96%E8%AF%91%E5%99%A8%E7%BC%96%E8%AF%91%E7%9A%84%E3%80%82%E6%88%91%E4%BD%BF%E7%94%A8%E5%8A%B3%E7%89%B9%E5%B7%B4%E8%B5%AB%E8%B0%83%E8%AF%95%E5%99%A8%E5%92%8C%20Trace32%20%E8%BD%AF%E4%BB%B6%E9%97%AA%E7%83%81%E4%BA%86%E7%B2%BE%E7%81%B5%E3%80%82%E8%B0%83%E8%AF%95%E4%B9%9F%E6%98%AF%E5%9C%A8%20Trace32%20%E4%B8%AD%E5%AE%8C%E6%88%90%E7%9A%84%E3%80%82%E7%9B%AE%E6%A0%87%E7%A1%AC%E4%BB%B6%E4%B8%BA%20MPC574xR%3C%2FP%3E%3CP%3E%E7%8E%B0%E5%9C%A8%E6%88%91%E6%83%B3%E6%94%B9%E7%94%A8%20S32%20%E5%B7%A5%E5%85%B7%E5%92%8C%20PE%20Micro%20%E8%B0%83%E8%AF%95%E5%99%A8%EF%BC%8C%E4%BD%86%E4%BB%A3%E7%A0%81%E4%BB%8D%E5%B0%86%E4%BD%BF%E7%94%A8%20GHS%20%E7%BC%96%E8%AF%91%E5%99%A8%E7%BC%96%E8%AF%91%E3%80%82%E6%88%91%E5%8F%AF%E4%BB%A5%E9%97%AA%E5%AD%98%E7%B2%BE%E7%81%B5%EF%BC%8C%E4%BD%86%E6%97%A0%E6%B3%95%E5%9C%A8%20S32%20%E4%B8%AD%E8%B0%83%E8%AF%95%E4%BB%A3%E7%A0%81%EF%BC%8C%E5%9B%A0%E4%B8%BA%E5%8F%AA%E8%83%BD%E7%9C%8B%E5%88%B0%20main.c%20%E6%96%87%E4%BB%B6%EF%BC%8C%E8%80%8C%E4%B8%8D%E6%98%AF%E5%AE%8C%E6%95%B4%E7%9A%84%E6%BA%90%E4%BB%A3%E7%A0%81%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E6%8C%89%E7%85%A7%E6%81%A9%E6%99%BA%E6%B5%A6%E6%96%87%E6%A1%A3%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32-Design-Studio-Knowledge-Base%2FHOWTO-download-separate-elf-srec-hex-file-to-microcontroller%2Fta-p%2F1127159%3Fprofile.language%3Den%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32-Design-Studio-Knowledge-Base%2FHOWTO-download-separate-elf-srec-hex-file-to-microcontroller%2Fta-p%2F1127159%3Fprofile.language%3Den%3C%2FA%3E%E4%B8%AD%E7%9A%84%E9%80%89%E9%A1%B9%201%20%E5%92%8C%202%20%E6%9B%B4%E6%96%B0%E4%BA%86%E8%B0%83%E8%AF%95%E9%85%8D%E7%BD%AE%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E5%B7%B2%E7%A1%AE%E4%BF%9D%E8%B0%83%E8%AF%95%E4%BF%A1%E6%81%AF%E5%92%8C%E7%AC%A6%E5%8F%B7%E9%83%BD%E5%AD%98%E5%9C%A8%EF%BC%8C%E5%B9%B6%E4%B8%94%E6%B2%A1%E6%9C%89%E8%BF%9B%E8%A1%8C%E4%BC%98%E5%8C%96%E3%80%82%E7%BC%96%E8%AF%91%E5%92%8C%E9%97%AA%E5%AD%98%E6%98%AF%E5%9C%A8%E5%90%8C%E4%B8%80%E7%B3%BB%E7%BB%9F%E4%B8%8A%E8%BF%9B%E8%A1%8C%E7%9A%84%EF%BC%8C%E5%9B%A0%E6%AD%A4%E4%B8%8D%E4%BC%9A%E5%87%BA%E7%8E%B0%E7%BC%96%E8%AF%91%E8%B7%AF%E5%BE%84%E9%94%99%E8%AF%AF%E7%9A%84%E9%97%AE%E9%A2%98%E3%80%82%3C%2FP%3E%3CP%3E%E6%9C%89%E8%B0%81%E8%83%BD%E6%8C%87%E5%87%BA%E5%8F%AF%E8%83%BD%E5%87%BA%E4%BA%86%E4%BB%80%E4%B9%88%E9%97%AE%E9%A2%98%EF%BC%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2142755%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Debugging%20AUTOSAR%20based%20source%20code%20in%20S32%7Cusing%20GHS%20compiler%20for%20PPC%20Architecture%20on%20MPC574xR%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2142755%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%97%A8%EF%BC%8C%E6%96%AF%E5%9D%A6%EF%BC%8C%E8%B0%A2%E8%B0%A2%E4%BD%A0%E7%9A%84%E7%AD%94%E5%A4%8D%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E6%9B%BE%E4%BD%BF%E7%94%A8%20Lauterbach%20Trace32%20%E8%BF%9B%E8%A1%8C%E8%B0%83%E8%AF%95%EF%BC%8C%E4%BD%86%E6%9C%80%E8%BF%91%E8%AE%B8%E5%8F%AF%E8%AF%81%E8%BF%87%E6%9C%9F%E4%BA%86%EF%BC%8C%E5%9B%A0%E6%AD%A4%E6%88%91%E5%B0%9D%E8%AF%95%E4%BD%BF%E7%94%A8%20S32%20%E5%92%8C%20PEMicro%20%E8%B0%83%E8%AF%95%E5%99%A8%E8%B0%83%E8%AF%95%E4%BB%A3%E7%A0%81%E3%80%82%E6%88%91%E5%B7%B2%E7%BB%8F%E8%AF%95%E8%BF%87%E4%BA%86%E6%82%A8%E5%88%86%E4%BA%AB%E7%9A%84%E5%89%8D%E4%B8%A4%E4%B8%AA%E9%93%BE%E6%8E%A5%E3%80%82%20%3C%2FP%3E%3CP%3E%E4%BD%86%E6%8D%AE%E6%88%91%E8%A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%AF%91%E6%88%90%E5%8A%9F%EF%BC%8C%E6%98%AF%E5%90%A6%E5%B0%B1%E5%8F%AF%E4%BB%A5%E5%AE%8C%E5%85%A8%E8%B0%83%E8%AF%95%E6%BA%90%E4%BB%A3%E7%A0%81%E8%80%8C%E4%B8%8D%E4%BC%9A%E5%87%BA%E7%8E%B0%E4%BB%BB%E4%BD%95%E9%97%AE%E9%A2%98%EF%BC%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2142751%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Debugging%20AUTOSAR%20based%20source%20code%20in%20S32%7Cusing%20GHS%20compiler%20for%20PPC%20Architecture%20on%20MPC574xR%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2142751%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%82%A8%E5%A5%BD%EF%BC%8C%3C%2FP%3E%0A%3CP%3ES32DS%20%2B%20GHS%20%E5%AE%98%E6%96%B9%E6%94%AF%E6%8C%81%E7%9A%84%E8%B0%83%E8%AF%95%E5%99%A8%E6%98%AF%20Lauterbach%EF%BC%9A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32-Design-Studio-Knowledge-Base%2FHOWTO-Install-Lauterbach-TRACE32-debugger-plug-in-into-S32%2Fta-p%2F1112237%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32-Design-Studio-Knowledge-Base%2FHOWTO-Install-Lauterbach-TRACE32-debugger-plug-in-into-S32%2Fta-p%2F1112237%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%E8%AF%B7%E5%8F%82%E9%98%85%E4%BB%A5%E4%B8%8B%E5%B0%86%20GHS%20Ecliplse%20%E6%8F%92%E4%BB%B6%E5%86%85%E7%BD%AE%E5%88%B0%20S32%20%E8%AE%BE%E8%AE%A1%E5%B7%A5%E4%BD%9C%E5%AE%A4%E7%9A%84%E8%AF%B4%E6%98%8E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32-Design-Studio-Knowledge-Base%2FHOWTO-Install-GHS-Compiler-Plugin%2Fta-p%2F1436232%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32-Design-Studio-Knowledge-Base%2FHOWTO-Install-GHS-Compiler-Plugin%2Fta-p%2F1436232%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%E5%9C%A8%20S32DS%20%E7%8E%AF%E5%A2%83%E4%B8%AD%EF%BC%8C%E8%BF%98%E6%9C%89%E5%8F%A6%E4%B8%80%E7%A7%8D%E8%B0%83%E8%AF%95%20GHS%20%E7%94%9F%E6%88%90%E7%9A%84%20elf%20%E7%9A%84%E6%96%B9%E6%B3%95%E3%80%82%20%E4%BD%86%E5%AE%83%E4%B9%9F%E6%9C%89%E4%B8%80%E4%BA%9B%E5%B1%80%E9%99%90%E6%80%A7%EF%BC%88%E8%AF%B7%E5%8F%82%E9%98%85%E4%B8%8B%E9%9D%A2%E7%9A%84%E5%B8%96%E5%AD%90%EF%BC%89%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32-Design-Studio%2F5744P-S32-Design-Studio-include-Green-Hills-Compiler-Problem%2Fm-p%2F652339%23comment-850410%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32-Design-Studio%2F5744P-S32-Design-Studio-include-Green-Hills-Compiler-Problem%2Fm-p%2F652339%23comment-850410%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%E8%AF%B7%E7%A1%AE%E4%BF%9D%E5%9C%A8%E8%B0%83%E8%AF%95%E4%B9%8B%E5%89%8D%E9%87%8D%E6%96%B0%E7%89%88%E6%9C%AC%E9%A1%B9%E7%9B%AE%E3%80%82%E5%A6%82%E6%9E%9C%E9%A1%B9%E7%9B%AE%E7%94%B1%E5%BA%93%E7%BB%84%E6%88%90%EF%BC%8C%E5%88%99%E5%8F%AF%E8%83%BD%E6%97%A0%E6%B3%95%E5%9C%A8%E6%BA%90%E4%BB%A3%E7%A0%81%E7%BA%A7%E5%88%AB%E4%B8%8A%E8%B0%83%E8%AF%95%E5%AE%83%E4%BB%AC%EF%BC%8C%E9%99%A4%E9%9D%9E%E4%B9%9F%E9%87%8D%E5%BB%BA%E5%AE%83%E4%BB%AC%E3%80%82%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E5%B8%8C%E6%9C%9B%E5%AF%B9%E4%BD%A0%E6%9C%89%E6%89%80%E5%B8%AE%E5%8A%A9%E3%80%82%3C%2FP%3E%0A%3CP%3EStan%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2138293%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Debugging%20AUTOSAR%20based%20source%20code%20in%20S32%7Cusing%20GHS%20compiler%20for%20PPC%20Architecture%20on%20MPC574xR%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2138293%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%3C%2FP%3E%0A%3CP%3EGHS%20elf%20%E4%B8%8E%20gcc%20%E8%B0%83%E8%AF%95%E5%99%A8%E7%9A%84%E5%85%BC%E5%AE%B9%E6%80%A7%E4%B8%8D%E5%BC%BA%EF%BC%8C%E6%9C%89%E4%B8%80%E5%AE%9A%E7%9A%84%E5%B1%80%E9%99%90%E6%80%A7%E3%80%82%E6%9C%89%E4%BA%9B%E4%B8%9C%E8%A5%BF%E6%97%A0%E6%B3%95%E6%AD%A3%E5%B8%B8%E5%B7%A5%E4%BD%9C%E3%80%82%3C%2FP%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