Hello, I bought a Devkit-MPC5744 recently, and downloaded the Model-based Design Toolbox for MPC5744P from the NXP website.
And then I open the example model file from the Model-based Design Toolbox. The model is "uart_model_pnt".
After that I configure the parameter and build the model, and then the Simulink generate the C code.
After that I created a new project in S32 design studio and replace the source file and header file with the C code generated from Simulink.
But when I import the C code into the S32 Design Studio, and build the project, it always failed.
The building operation always abort ,and a red cross occured.
my project in S32 ds
The everyone process before the building seems OK. But I cannot build the code generated from the simulink.
Could anyone please help me?
Hi,
can you please share output from build console?
Jiri
Thank you for your reply. The console is as fellow:
It says cannot open the *.s file, but in fact the Simulink generated the *.s file and I put them into the "src" folder.
So how can I solve the problem? thank you
Hi,
for some reason is S32DS using files from temporary folder. It is possible share your project?
Jiri
No problem. The project and the code generated from the Simulink are as fellow.
And I tried after your last reply.
I tried to delete the *.s file in the "src" folder, it is not ok.
And then I put the *.s file which contains the 'e200zx_interrupt_setup' function, into the "include" folder, it is ok to read. But then new problem occur.
So I put the all *.s files into the "include" folder. But the problem is still here, and new problem occurs:
Could you please show me how to compile the code generated from the Simulink?
Thank you so much.
Best wishes.
Hi,
thanks for sharing your project. So - there was couple issues - you need to use linker script file from Simulink project. Second one - Simulink project already contains startup code. I excluded from build default startup.S. Also some assembly code are used for include (in include), some others are dedicated to build (in src)
Fixed project is in attachment.
Jiri
Thank you, Jiri. I do appreciate your help.
The fixed project has been successful to compile, but with a warning.
And the problem is that the program doesn't run.
When I click "resume" button and start the program, it will stop somewhere in configure_flash.s file
And when I reclick the "resume" button, the program seems running, but actually not running.
I am sure the program are not running because I add some sentences to turn on the LED. However, it doesn't work.
The console text is in attachment.
I do appreciate if you could help.
Hi,
this question is more related to Model-based design toolbox than S32DS and I'm not familiar with this stuff. Better idea is place your question to this community - https://community.nxp.com/community/mbdt/diy
Jiri
Thank you soooooooooooo much, Jiri.
I will place the question in the community which you mentioned.