How can I run the C code project generated from MBDT?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How can I run the C code project generated from MBDT?

2,286 次查看
1506840872
Contributor II

Hi,everyone. 

I bought a Devkit-MPC5744 recently, and downloaded the Model-based Design Toolbox for MPC5744P from the NXP website.

pastedImage_1.png

 

And then I open the example model file from the Model-based Design Toolbox. The model is "uart_model_pnt".

pastedImage_6.png

 

 After that I configure the parameter and build the model, and then the Simulink generate the C code.

pastedImage_5.png

pastedImage_7.png

 

After the help of NXP S32 ds community, the project could be compiled successfully.

But 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

pastedImage_3.png

pastedImage_4.png

 

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.

pastedImage_8.png

 The console text and the project are in attachment.

Maybe my progress are not correct?

I would do appreciate it if you could help.

0 项奖励
回复
6 回复数

1,981 次查看
constantinrazva
NXP Employee
NXP Employee

Hello 1506840872@qq.com‌,

You should try importing using the file exported by our toolbox to avoid any startup/linker/compiler issues (which I suspect to be the problem in your case). You can follow this article on how to import it to S32DS for Power (link).

Please let us know if you encounter any issues following this approach.

Kind regards,

Razvan.

0 项奖励
回复

1,981 次查看
1506840872
Contributor II

Hi,  Constantin.

Thank you for your reply and recommendation.

But the howto doc says S21ds_PA_V1.2 is needed. Can I replace the V1.2 with 2017R1 ?

Thank you previously,

0 项奖励
回复

1,981 次查看
mariuslucianand
NXP Employee
NXP Employee

Hello 1506840872@qq.com‌,

The doc refers to the version of "S32DS for PA 1.2 or newer" so it is fine to use the 2017R1 version.

Best Regards, 

Marius

0 项奖励
回复

1,981 次查看
1506840872
Contributor II

Thank you, Marius.

And the howto doc says the Hotfix _4 is needed in the progress. But is that needed in all operation, for example, in simulation, or just needed in the Exporting Code?

0 项奖励
回复

1,981 次查看
mariuslucianand
NXP Employee
NXP Employee

Hello 1506840872@qq.com‌,

Hotfix 4 is needed for providing a right xml file for importing the generated code in the S32DS as a project; so if I understood correctly your question this hotfix it is used only for the Exporting Code. This Hotfix should be applied only once.

Best Regards,

Marius

0 项奖励
回复

1,981 次查看
1506840872
Contributor II

Thank you so much

0 项奖励
回复