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)
This generates the code and creates a file.
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
解決済! 解決策の投稿を見る。
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)
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.
Hope this helps,
Marius
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)
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.
Hope this helps,
Marius