Simulink - Model-based-design-Toolbox - build and flash questions

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Simulink - Model-based-design-Toolbox - build and flash questions

ソリューションへジャンプ
1,238件の閲覧回数
Raphael2
Contributor III

Hello,

I have a general question about flashing a microcontroller with simulink - matlab.

Until now I only tried example projects and to do so I always used the Build button of the Embedded Coder. (I work with the s32k144 EVB)

Praemas_0-1626343224046.png

This generates the code and creates a file.

Praemas_1-1626343336867.png

If I wanna flash the Board again with this example I always pressed the Build button again.

1. Do I always overwrite the file above by this step? And could this lead to any problems?

2. Can I reuse the generated code in the file and flash it directly to the board with Matlab without opening the project in Simulink again? If yes how do I do it?

3. Can I flash the board with the generated file but with S32 Design Studio for ARM

Best Regards

0 件の賞賛
返信
1 解決策
1,229件の閲覧回数
mariuslucianand
NXP Employee
NXP Employee

Hello @Raphael2 ,

Let's answer your questions one by one.

1. Do I always overwrite the file above by this step? And could this lead to any problems?

The code should be generated and build every time when you press the build button. The code regeneration cannot lead to any problems.

2. Can I reuse the generated code in the file and flash it directly to the board with Matlab without opening the project in Simulink again? If yes how do I do it?

The short answer here is yes. You have to copy-paste the .mot file from inside the generated folder to the S32K144 mounded drive. In my case is EVB-S32K144 (D)

mariuslucianand_0-1626346568929.png

3. Can I flash the board with the generated file but with S32 Design Studio for ARM

Absolutely. If you only have to flash the generated code, then inside the folder you will find a .elf file. In S32DS for ARM you have to go to the Flash window, Select a project for S32K144, then Browse for the .elf file and press Flash.

mariuslucianand_1-1626346772092.png

Hope this helps,

Marius

 

元の投稿で解決策を見る

1 返信
1,230件の閲覧回数
mariuslucianand
NXP Employee
NXP Employee

Hello @Raphael2 ,

Let's answer your questions one by one.

1. Do I always overwrite the file above by this step? And could this lead to any problems?

The code should be generated and build every time when you press the build button. The code regeneration cannot lead to any problems.

2. Can I reuse the generated code in the file and flash it directly to the board with Matlab without opening the project in Simulink again? If yes how do I do it?

The short answer here is yes. You have to copy-paste the .mot file from inside the generated folder to the S32K144 mounded drive. In my case is EVB-S32K144 (D)

mariuslucianand_0-1626346568929.png

3. Can I flash the board with the generated file but with S32 Design Studio for ARM

Absolutely. If you only have to flash the generated code, then inside the folder you will find a .elf file. In S32DS for ARM you have to go to the Flash window, Select a project for S32K144, then Browse for the .elf file and press Flash.

mariuslucianand_1-1626346772092.png

Hope this helps,

Marius