How to export S32K144 MBDT Generated Code to S32 Design Studio

cancel
Showing results for 
Search instead for 
Did you mean: 

How to export S32K144 MBDT Generated Code to S32 Design Studio

347 Views
RajG
Contributor III

Hello community members, I was successful in importing the MATLAB MBDT code to S32 Design Studio using ".elf" file.

The MBDT model is working okay and my hardware is working as per design. But as I imported the design to S32 Design Studio it has some issues. I am attaching screenshot of the same.

1st image "not_able_to_build.png" shows that project was imported sucessfully and all files were also present still i was unable to build the project.
 
2nd image "error_in_import.png" shows that when I open any file it throws some errors, this errors comes in any file of the same project that I open. 
 
Help me solve the issues.
Thanks and Regards,
RajG.
0 Kudos
13 Replies

123 Views
Chennal
Contributor I

Same poblem,and message saying “Corrupted build tools for project”,installation details of the S32DS for ARM as same as your post.

@mariuslucianand 

Thanks and Regards

 

0 Kudos

278 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @RajG , @ruihang_wu ,

How do you import the project in S32DS? On my end, I've tried to import the generated code for the PMSM_OpenLoop_s32k144 model and I am able to build the generated code. Let me explain the steps:

1. Make sure that the Simulink model has the "Generated S32DS ProjectInfo.xml checked in the Config model.

mariuslucianand_0-1615549266643.png

2. Go to S32DS for ARM 2.2 go to File > Import, and under S32 Design Studio check the ProjectInfo.xml Importer

mariuslucianand_1-1615549320726.png

3. In the newly opened window, please select the ProjectInfo.xml file from the generated code, and make all the below checks.

mariuslucianand_2-1615549532448.png

4.Once the import process has been completed, open the PMSM_OpenLoop_s32k144.c and you should now able to build the project.

mariuslucianand_3-1615549773813.png

In my console log, you can see that the project has been successfully built and now you can go to the Debug configuration and start debugging the code on the board.

mariuslucianand_4-1615549904761.png

 

Hope this helps,

Marius

 

0 Kudos

267 Views
ruihang_wu
Contributor III

Hello Marius

Thank you for your reply.

I am doing the same thing as you bug after I import the project I get a message in the console saying "corrupted build tool for project : [project name]"

In addition I don't have the build option when I right click the project after importing

Screenshot 2021-03-12 121157.png

0 Kudos

261 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @ruihang_wu,

Does it happen with all the Simulink models or only with your own model?

Can you please generate the code for the PMSM_OpenLoop_s32k144 project that comes with our toolbox and send the whole generated code to me (you can do so in private as well). I want to try to import it in my S32DS to see if the issue is caused by the generated code or the S32DS.

Regards,

Marius

0 Kudos

242 Views
ruihang_wu
Contributor III

Hello @mariuslucianand 

 

Sorry for the late reply. I have attached the output folder after building the model. If I try to import the ProjectInfo file in this folder I still get the problems described before.

 

Thank you

0 Kudos

231 Views
RajG
Contributor III

hello @ruihang_wu @mariuslucianand 
thanks for the reply.

I followed all the steps as mentioned above by @mariuslucianand  but still facing same issue and i also tried to do same process with other models and it ended in same way that is not building...
(below is the screenshot of project I did using the steps provided.)

I also tried to import the project provided by @ruihang_wu and still faced same issue....

Tags (1)
0 Kudos

215 Views
mariuslucianand
NXP Employee
NXP Employee

@RajG , @ruihang_wu ,

This is my output of the Console log when I import the generated code into the S32Design Studio.

mariuslucianand_0-1615639017804.png

Maybe the issue is from S32DS. Can you please show me the installation details of the S32DS for ARM? Go to Help > Installation Details.

mariuslucianand_1-1615639188297.png

I wonder if you need to install the S32 Design Studio for ARM 2.2 Update 1 S32 SDK for S32K1xx SR RTM 3.0.3

To show enable the build button please open one of the sources from the newly imported project. Can you please also attach the console log output error from from the build process?

Regards,

Marius

0 Kudos

110 Views
ruihang_wu
Contributor III

Here is the installation details window. I am still running version 2.2

I remember this working before

 

ruihang_wu_0-1615907915507.png

 

0 Kudos

158 Views
RajG
Contributor III

Below is the installation details of the S32DS for ARM:
I have also open file still build button doesn't shows up and console log output error is still similar to what I attached earlier I will again attach that same file.

 

Tags (1)
0 Kudos

76 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @ruihang_wu , @RajG 

I had a look at the generated code once again, and the only difference that seems to have a connection with the fact that the Build button is missing is that some of the links from the Project.xml have some spaces.

mariuslucianand_0-1616413989899.png

From the attached example, I see that the toolbox is installed in the \AppData\Roaming\MathWorks\Matlab Add-Ons\ ...

I think the only way in which you can solve this is to install the toolbox in a path which contains no spaces. The easiest way is to uninstall our toolbox, go to Matlab ->Preferences -> Matlab -> Add-Ons and type a path with no spaces. Then reinstall again the MBDT toolbox and you will be able to import and build the generated code. For the best results, please use paths with no spaces for the model generated code folder as well.

mariuslucianand_1-1616414125158.png

 

 

 

Hope this helps,

Marius

 

0 Kudos

287 Views
RajG
Contributor III

still no progress.... and I am using S32k144 so its S32DS for Arm and not PA so no such easy way @KathyPoole .
still required some guide to proceed.


Thanks and Regards,

RajG

0 Kudos

312 Views
KathyPoole
Contributor I

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.  

 

0 Kudos

322 Views
ruihang_wu
Contributor III

I am seeing the same problem. Additionally I see a message saying "Corrupted build tools for project" in the console.

0 Kudos