S12Z weak function

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
3,038件の閲覧回数
francoisdugue
Contributor III

Hi,

I'm working with S12ZVL devices, and i try to use "weak" function attribute.

I don't find any clear statement (or example) on S12Z, that this attribute is available or not.

Can you help me on this subject?

 

Thanks in advance.

0 件の賞賛
1 解決策
3,005件の閲覧回数
StanoA
NXP TechSupport
NXP TechSupport

Hi Francois,

I’m sorry that it don’t help you.

I made test for Kinetis MCU in the same CW IDE and it is supported. My understanding is this attribute is not supported by S12 Compiler. The ARM Kinetis use the GCC which supports this option. In case I take such suggestion how to solve it I will send you message.

Sorry I can’t help you more.

Best Regards,

Stano.

元の投稿で解決策を見る

0 件の賞賛
7 返答(返信)
3,025件の閲覧回数
francoisdugue
Contributor III

Hi,

Thank you for this answer.

As your link is about Kinetis devices (not the same tool chain) i'll do some tests.

I'll keep you informed.

Thank you

0 件の賞賛
3,022件の閲覧回数
StanoA
NXP TechSupport
NXP TechSupport

You are welcome.

0 件の賞賛
3,032件の閲覧回数
StanoA
NXP TechSupport
NXP TechSupport

Hi Francois,

Sorry we haven’t code example for this attribute usage.

But the S12Z family of MCUs is supported by our CodeWarrior IDE (v11.1) and the “weak” attribute is supported also. You can see it in:

https://www.nxp.com/docs/en/reference-manual/CWMCUGCCCMPREF.pdf

on page 40.

The CW IDE 10.x is the predecessor of the CW IDE v11.1.

I hope it could help you in your task.

Best Regards,

Stano.

0 件の賞賛
3,015件の閲覧回数
francoisdugue
Contributor III

Hi,

Unfortunately it doesn't work.

=extern bool_t bTask_1_Init(void) __attribute__((weak, alias("bNullInit")));
>illegal or unsupported __attribute__

 

Maybe i miss something. Do you have any idea?

Thank in advance.

0 件の賞賛
3,006件の閲覧回数
StanoA
NXP TechSupport
NXP TechSupport

Hi Francois,

I’m sorry that it don’t help you.

I made test for Kinetis MCU in the same CW IDE and it is supported. My understanding is this attribute is not supported by S12 Compiler. The ARM Kinetis use the GCC which supports this option. In case I take such suggestion how to solve it I will send you message.

Sorry I can’t help you more.

Best Regards,

Stano.

0 件の賞賛
3,002件の閲覧回数
francoisdugue
Contributor III

Hi,

So, we have the same conclusion.

S12Z toolchain doesn't support weak function attribute.

Thank you for your support.

 

0 件の賞賛
2,998件の閲覧回数
StanoA
NXP TechSupport
NXP TechSupport

Thank you for your answer.

You are welcome.

Stano.

 

0 件の賞賛