Compiler MPC5777C

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Compiler MPC5777C

Jump to solution
4,364 Views
fraidling
Contributor II

Hello,

i want to use a Trace32 Debugger to program and debug the MPC5777C Evaluation Board.

I have read and customized some examples with the  S32DS IDE, now i want to compile and then run my own software on the actual Hardware.

But I still have some basic questions: how do i get the project files executable for the Lauterbach Debugger to program the MPC5777C?

Is the S32DS IDE sufficient to generate a .cmm File from a build/released project file?

Or is a Crosscompiler from Greenhills or Windriver mandatory, so is S32DS just for programming and then forward the compiler released/build project files?

I would appreciate some clarification, thanks in advance!

Florens

Labels (1)
1 Solution
3,118 Views
stanish
NXP Employee
NXP Employee

Hi Florens,

S32 Design Studio Project Wizard can create GCC project + TRACE32 debug configuration automatically:

pastedImage_1.png

The Project Wizard allows you to create a project with any mix of the build tools (GHS, Windriver, GCC) and debug interface (GDB, Pemicro, PLS, Lauterbach).

For Lauterbach debug option - .cmm scripts are included in the project folder (see the screenshot below) Lauterbach configuration is available in Debug Configuration dialog.

All you need to do is to install Lauterbach Eclipse plugin into S32 Design Studio (it's not part of S32DS installer).

The integration is documented in S32DS reference manual: 
"<S32_Power_v1.1>\S32DS\help\pdf\s32ds.pwr.win.reference_manual.pdf" , section "6.2 Lauterbach connection".

pastedImage_1.png

pastedImage_3.png

Hope it helps!

Stan

View solution in original post

8 Replies
3,119 Views
stanish
NXP Employee
NXP Employee

Hi Florens,

S32 Design Studio Project Wizard can create GCC project + TRACE32 debug configuration automatically:

pastedImage_1.png

The Project Wizard allows you to create a project with any mix of the build tools (GHS, Windriver, GCC) and debug interface (GDB, Pemicro, PLS, Lauterbach).

For Lauterbach debug option - .cmm scripts are included in the project folder (see the screenshot below) Lauterbach configuration is available in Debug Configuration dialog.

All you need to do is to install Lauterbach Eclipse plugin into S32 Design Studio (it's not part of S32DS installer).

The integration is documented in S32DS reference manual: 
"<S32_Power_v1.1>\S32DS\help\pdf\s32ds.pwr.win.reference_manual.pdf" , section "6.2 Lauterbach connection".

pastedImage_1.png

pastedImage_3.png

Hope it helps!

Stan

3,118 Views
fraidling
Contributor II

Hi Stan,

I have tested the debug configuration on the actual Hardware and it works (partially).

As far as I understand: S32DS  create a .ELF file with the GCC Compiler, the  flash.cmm skript is for the Lauterbach Debugger to transfer the executable file on the MPC5777C.

there are 3 configs for each project:

1. "..._Z7_0_Debug_Lauterbach" -  trace32 starts and i can debug the program and see the source files.
The generated .ELF File is also executable with customized .cmm skripts out of trace32. So this case cover my needs.

2. "..._Z7_0_Release_Lauterbach" - the created .ELF File works too, but trace32 will not load the source files correctly: while debugging in Trace32 i can only see the ASM (assembler) sourcecode, i cant switch too Hll (High Level Language) correctly. Same problem with customized .cmm skripts where i tried to reload them.

Any Ideas how to fix this problem or is there no difference between debug and released files? (So i would just continue to use the debug config)

3. "..._Z7_0_Debug_RAM_Lauterbach" - this one use the ram.cmm script but trace32 can't find the correct .ELF file (not generated or wrong file path), so it doesn't work. 

Thanks again for your help,

Florens

0 Kudos
3,118 Views
stanish
NXP Employee
NXP Employee

Hello Florens,

each S32DS project for MPC57xx created by the project Wizard contains 3 different build configurations by default.

1) Debug - this is targeting internal flash memory, optimization are off for easy debugging

2) Debug RAM - basically same as Debug but program is linked into RAM memory instead of Flash/ROM. This makes debugging faster - internal flash is not programmed at all but it may require re-programming after a reset. 

3) Release - this is basically a version with the compiler optimizations enabled and without debug information (e.g. production version).  The linker place the code/consts into flash memory (same as Debug). 

Each build configuration creates separate folder (Debug/Debug_RAM/Release) where the output (elf) file is generated into.

Before debugging please make sure the elf file exist - I suspect this could be causing the issue with Debug_RAM you ve observed.

The source code is not visible in case of Release version of elf file because the debug information is switched off intentionally by default. You can try to enable it in the compiler settings and debug the optimized version of your project. But debugging of highly optimized code could be quite challenging.

pastedImage_7.png

Hope it helps!

Stan

3,118 Views
nxppower912935
Contributor IV

Hi Stan,

looks nice, but my S32DS installation shows no T32 option to select.

Actually I wasn't able to install the T32 eclipse plugin at first with error message "requires 'org.eclipse.tcf.core 0.0.0'", but then I cloned the eclipse git (git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.git) and basically dumped the plugins into the plugins folder, which made it work partially, because under Debug Config, there is no T32 as shown in your screenshot but I have a T32 navigation menu now at least.

Any ideas what it could be? Florens it works for you as I understood.

Many thanks,

Ludwig

Voila_Capture 2017-05-31_01-15-57_am.jpg

Screenshot: T32 nor UDE can be selected from Debugger option.

0 Kudos
3,118 Views
stanish
NXP Employee
NXP Employee

Hello Ludwig,

It seems you installed a different plug-in. Currently S32DS does not support TCF version plug-in by Lauterbach.

I'd suggest to uninstall the plug-in you installed (go to menu "Help" -> "Installation Details" and search the Lauterbach plug-in there). You will probably see a different name since the one on the picture below is the supported one:

pastedImage_2.png

Now restart S32DS and install the supported variant of Lauterbach eclipse plug-in:

HOWTO: Install Lauterbach TRACE32 debugger plug-in into S32 Design Studio 

Hope it helps!

Stan

3,118 Views
nxppower912935
Contributor IV

Hi Stan,

thanks for this hint! I was further wondering if you can hook the T32 simulator(s) instead of a real target, that would be interesting for small experiments.

Regards 

0 Kudos
3,118 Views
fraidling
Contributor II

Thanks Stanislav,

i installed the Lauterbach Eclipse plugin and can create new projects with the automatic debug configuration.

When i debug a project, trace32 will open and it says connection with eclipse established, it seems to work!

I will get the MPC5777C next week so i just tested some projects with the trace32 powerpc simulator.

Florens

0 Kudos
3,116 Views
nxppower912935
Contributor IV

Hi fraidling‌,

did you check for a suitable *.cmm inside the demo projects?

Another option is checking inside your T32 demo folder, there are several 5777 cmm files.

S32 is not generating cmm file, it's scripted usually by hand I think.

Regards,

Lu

0 Kudos