S32K14x:import simulink code to S32DS

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

S32K14x:import simulink code to S32DS

ソリューションへジャンプ
1,254件の閲覧回数
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,227件の閲覧回数
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,228件の閲覧回数
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,222件の閲覧回数
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,217件の閲覧回数
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 件の賞賛