How to export Generated Code to S32 Design Studio IDE (applicable for MBDT for MPC5744P v2.0)

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

How to export Generated Code to S32 Design Studio IDE (applicable for MBDT for MPC5744P v2.0)

19,229 Views
dumitru-daniel_
NXP Employee
NXP Employee

In case you need to export the generated code to S32 Design Studio for PA IDE, now there is an easy way. No more painful job of reconstruction the project manually and setting all sort of compiler flags. Here is what you need to do in just a few steps.

Prerequisite:

Toolbox for MPC5744P rev2.0: Model Based Design Toolbox For Panther (MPC574xP) Family of Processors 2.0 IS NOW AVAILABLE! 

HotFix_4 for MPC5744P rev2.0: https://community.nxp.com/thread/451804#comment-925214 

S32DS IDE v1.2 or newer:  S32 Design Studio for Power v1.2.

How to:

#1: make sure the HotFix_4 is installed successfully and the "Generated S32 Design Studio ProjectInfo.xml file" option is visible and selected

pastedImage_5.png

#2: build the Simulink model as normal (e.g. Motor Control System example from Motor Control Class: Lecture 12 - Motor Control System since it is the most complex application we built so far on this community) and wait until is completed successfully.

pastedImage_123.png

 

#3: Open S32DS for PA and select Import/S32 Design Studio/ProjectInfo.xml Importer

pastedImage_124.png

#4: Press Next and select the ProjectInfo.xml from the location used to generated the C-code for the Simulink model. Also, select the E200 Executable option

pastedImage_166.png

#5: Click on Finish button to have the project imported into the S32 Design Studio workspace.

pastedImage_168.png

#6: Applicable for S32DS v1.2 (due to a bug in IDE): Open the Project Properties and go to Settings/Target Processor and select "generate code for E200Z4" as Target Processor and re=select the option shown near the Libraries Support. These will force the IDE to update the toolchain properties correctly. These limitations will be addressed in the newer versions of S32DS for PA.  

pastedImage_169.png

#7: Build the project

pastedImage_175.png

Expected result: The executable file should be produced without any errors. In case of errors - please recheck #6.

pastedImage_178.png

51 Replies

1,854 Views
zhangrunhe
Contributor I

Hi daniel,

  Why can't I open the projectInfo.xml file?

error.png

0 Kudos

1,688 Views
constantinrazva
NXP Employee
NXP Employee

Hello zhangrunhe@hotmail.com‌,

I'm not sure what the problem is - can you give me some more details to try and figure it out?

1) Did you select the ProjectInfo.xml file generated by our toolbox?

2) What version of S32 Design Studio do you have? (note: whatever version might it be, it has to be S32DS for Power Architecture if you want to import from a MPCxxxx toolbox and S32DS for ARM if you want to import from S32K14x toolbox).

3) Do you have another project with the same name already in your workspace? You can try changing the project name to someting like aaaClosedLooop_Control_mbd_rtw  to see if that is the problem.

Kind regards,

Razvan.

0 Kudos

1,685 Views
zhangrunhe
Contributor I

Hi Razvan,

   Sorry, I will provide more details.

   1)yes,i  select the ProjectInfo.xml file generated by my toolbox.

   2)I'm sure my version of S32 Design Studio is S32DS for Power Architecture.

   3)I have no another project with the same name already in your workspace.

Thank you very much and wait for your reply.

S32.png

S321.png

0 Kudos

1,685 Views
constantinrazva
NXP Employee
NXP Employee

Hello zhangrunhe@hotmail.com‌,

As the error message is not shown in S32DS and I could not find any of the common problems encountered when importing a project, I am not sure why this is happening. The ProjectInfo.xml file at my end works and I couldn't reproduce your issue. As I am not an expert in S32DS, could you post your question in the S32 Design Studio  community? I think that without an error message associated, that is the best place to get your answer from.

Hope this helps,

Razvan.

0 Kudos

1,685 Views
hjhjhj
Contributor IV

Hi Daniel,

     Though having completed the whole process and builded the project sucessfully, the error ocurrs when I try to debug the project.The error message is as follows.Do you know the reason?

55.PNG

66.PNG

Thanks!

 Hj

0 Kudos

1,634 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi hjhjhj

The easiest way to create a debug configuration is to start from an S32DS stationery project and then simply change its existing GDB debug launch configuration to debug the elf/project you wish to investigate.

Best regards,

Daniel

1,633 Views
paulvlase
NXP Employee
NXP Employee

Hi hjhjhj‌,

Check this thread https://community.nxp.com/thread/454916 .

There is a bug in S32 Design Studio for Power v1.2, you need to set the GDB Executable to ${cross_prefix}gdb${cross_suffix}

0 Kudos

1,227 Views
hjhjhj
Contributor IV

Hi@Paul Vlase

      There isn't the option "GDB Executable" in the debug configuration page and it seems different  between the project generated by S32DS and project generated by simulink.And I can't find "GDB Executable"in any other place as well.Can you help me find it?

66.PNG

Thanks!

Hj

0 Kudos

1,224 Views
paulvlase
NXP Employee
NXP Employee

Hi hjhjhj,

Try to set GDB debugger property to ${cross_prefix}gdb${cross_suffix} .

0 Kudos

1,137 Views
hjhjhj
Contributor IV

Hi@Paul Vlase,

     Setting GDB debugger property to ${cross_prefix}gdb${cross_suffix} works,but another error occurs .

22.PNG

33.PNG

11.PNG

Thanks!

Hj

0 Kudos