Simulink top level subsystem block names cause different code generated from compiler

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

Simulink top level subsystem block names cause different code generated from compiler

ソリューションへジャンプ
3,440件の閲覧回数
hubeiren
Contributor II

We use MBD_toolbox MPC57xx V3.1 for our motor control (MCU). We have four top level subsystems (Application, HW interface, OS and MPC Config). The four subsystems were named automatically by simulink as subsystem 1,2,3 and 4. We built it and run in our ECU without issue. For better readability,  I changes subsystem names as Application, Interface, OS and Config. After built, it doesn't run in ECU anymore. And  the code generated are quite different. I changed them to subsystemApplication, subsystemInterface, subsystemOS and subsystemConfig. They are OK. Under the top level subsystem, we have named the sub-subsystem with all kind of names. There is no issues.

My question: Why the top level subsystem have to be started with "subsystem"?

Thanks,

Li

1 解決策
3,334件の閲覧回数
hubeiren
Contributor II

After many trials, we found out that (at least at top level) model was built based on subsystem name's alphabet. It's not based from top to bottom, or from left to right. So anyone who want to make subsystem name has to be aware of this hidden rules.

Thanks for offering help! 

元の投稿で解決策を見る

4 返答(返信)
3,334件の閲覧回数
hubeiren
Contributor II

I did more test but couldn't figure out the causes.

- Subsystem Name Test

Summary:

Test #

Subsystem Names

Results

1

SubsystemApplication, SubsystemInterface, SubsystemOS, SubsystemConfig

pass

2

S_Application, S_Interface, S_OS, S_Config

pass

3

G_Application, G_Interface, G_OS, G_Config

Pass

4

Application, G_Interface, G_OS, G_Config

Pass

5

Application, Interface, G_OS, G_Config

Pass

6

Application, Interface, OS, G_Config

Pass

7

Application, Interface, OS, Config

Pass

8

Application, Interface, OS, MPC_Config

Fail

9

Application, Interface, OS, MPC_1Config

Fail

10

Repeat Test #7

Pass

11

Application, Interface, OS, MPC1_Config

Fail

12

Application, Interface, OS, MP_C_Config

Fail

0 件の賞賛
返信
3,334件の閲覧回数
constantinrazva
NXP Employee
NXP Employee

Hello hubeiren@yahoo.com‌,

Could you send us the model you are using? You can delete proprietary code and only leave parts of the model so that I can replicate your issue. Once I have it I can investigate and also contact Mathworks (if the issue is not caused by our toolbox, but by Simulink).

Kind regards,

Razvan. 

0 件の賞賛
返信
3,335件の閲覧回数
hubeiren
Contributor II

After many trials, we found out that (at least at top level) model was built based on subsystem name's alphabet. It's not based from top to bottom, or from left to right. So anyone who want to make subsystem name has to be aware of this hidden rules.

Thanks for offering help! 

3,334件の閲覧回数
constantinrazva
NXP Employee
NXP Employee

Hello hubeiren@yahoo.com,

Thank you for taking the time to share that information with the entire community!

Kind regards,

Razvan.

0 件の賞賛
返信