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
#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.
#3: Open S32DS for PA and select Import/S32 Design Studio/ProjectInfo.xml Importer
#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
#5: Click on Finish button to have the project imported into the S32 Design Studio workspace.
#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.
#7: Build the project
Expected result: The executable file should be produced without any errors. In case of errors - please recheck #6.
Hello 1506840872@qq.com,
Yes, you can use the latest version of S32DS to import the generated code.
Best Regards,
Marius
Hi daniel,
Why can't I open the projectInfo.xml file?
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.
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.
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.
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?
Thanks!
Hj
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
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}
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?
Thanks!
Hj
Hi hjhjhj,
Try to set GDB debugger property to ${cross_prefix}gdb${cross_suffix} .
Hi@Paul Vlase,
Setting GDB debugger property to ${cross_prefix}gdb${cross_suffix} works,but another error occurs .
Thanks!
Hj