S32K14x:import simulink code to S32DS

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

S32K14x:import simulink code to S32DS

跳至解决方案
1,314 次查看
Lilac
Contributor I

I just started learning to use Simulink in combination with MCU..

How to import simulink-generated code into S32DS so that it can be executed in conjunction with projects in S32DS. So that part of our project was designed by Simulink, the hardware driver code and main functions were handmade in the S32DS.

For example,there are three variables defined by Simulink modeling, i have generated the c code of the Simulink modeling,i want to import it into S32DS, and then the SDK package is used to configure the values of the variables to the values of ADC voltage sampling.

0 项奖励
1 解答
1,287 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@Lilac

1.For example:

simulink_example.h(generated by matlab)

/* Imported (extern) block signals */
extern uint8_T Input_1;/* '<Root>/In1' */

 

 main.c

#Include "simulnk.h"

/*Define Simulink Stateflow Chart Input parameters*
uint8_T	 	Input_1 = 0;

 

2.How to include external files,and add the files path

for example.

Senlent_0-1638770995585.png

 

Senlent_1-1638771017185.png

BR!

     Jim,

 

 

在原帖中查看解决方案

0 项奖励
3 回复数
1,288 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@Lilac

1.For example:

simulink_example.h(generated by matlab)

/* Imported (extern) block signals */
extern uint8_T Input_1;/* '<Root>/In1' */

 

 main.c

#Include "simulnk.h"

/*Define Simulink Stateflow Chart Input parameters*
uint8_T	 	Input_1 = 0;

 

2.How to include external files,and add the files path

for example.

Senlent_0-1638770995585.png

 

Senlent_1-1638771017185.png

BR!

     Jim,

 

 

0 项奖励
1,282 次查看
Lilac
Contributor I

Thanks for your reply!

But the last picture is really unclear, I can't see what you chose. And this is my screenshot, can you tell me which one is the right one?

Lilac_0-1638774639286.png

 

0 项奖励
1,277 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@Lilac

It doesn't matter,for the last picture, I just want to tell you where to add or delete the files path. 

Senlent_0-1638777547427.png

BR!

     Jim,

 

0 项奖励