How to export S32K144 MBDT Generated Code to S32 Design Studio

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

How to export S32K144 MBDT Generated Code to S32 Design Studio

7,457 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
15 Replies

1,809 Views
sagarkapate
Contributor I

How to IMPORT Generated Code to S32 Design Studio ARM IDE (applicable for MBDT for S32K148)

 

I am going to the same problem after import build button is disable it can be build using this process.

please provide some solution on it.

0 Kudos

7,232 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

7,388 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

6,739 Views
ykarata1
Contributor IV

Dear @mariuslucianand ,

 

We have run into again blank character in the directory error and solved that.

 

When we try to flash and debug our SW, then we had realized that there are missing source and .h files. Also I have added them manually by copying .slprj folder to project folder.

Now, I can build successfully.

ykarata1_0-1623739789397.png

But when I flash SW to embedded system, I get error depicted below.

What is the problem? How can I solve that?

 

NOTE: I can flash different project succesfully with the same Hardware

ykarata1_2-1623739853388.png

 

ykarata1_1-1623739831941.png

 

 

-

 

0 Kudos

7,382 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

7,376 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

7,357 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

7,347 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

7,331 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

7,226 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

7,272 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

7,190 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

 

7,401 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

7,426 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

7,436 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