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.
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.
2. Go to S32DS for ARM 2.2 go to File > Import, and under S32 Design Studio check the ProjectInfo.xml Importer
3. In the newly opened window, please select the ProjectInfo.xml file from the generated code, and make all the below checks.
4.Once the import process has been completed, open the PMSM_OpenLoop_s32k144.c and you should now able to build the project.
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.
Hope this helps,
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
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.
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.
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....
This is my output of the Console log when I import the generated code into the S32Design Studio.
Maybe the issue is from S32DS. Can you please show me the installation details of the S32DS for ARM? Go to Help > Installation Details.
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?
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.
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.
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.
Hope this helps,
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.