S12Z weak function

cancel
Showing results for 
Search instead for 
Did you mean: 

S12Z weak function

Jump to solution
222 Views
francoisdugue
Contributor I

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 Kudos
1 Solution
189 Views
StanoA
NXP Employee
NXP Employee

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.

View solution in original post

0 Kudos
7 Replies
209 Views
francoisdugue
Contributor I

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 Kudos
205 Views
StanoA
NXP Employee
NXP Employee

You are welcome.

0 Kudos
215 Views
StanoA
NXP Employee
NXP Employee

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 Kudos
198 Views
francoisdugue
Contributor I

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 Kudos
190 Views
StanoA
NXP Employee
NXP Employee

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.

View solution in original post

0 Kudos
185 Views
francoisdugue
Contributor I

Hi,

So, we have the same conclusion.

S12Z toolchain doesn't support weak function attribute.

Thank you for your support.

 

0 Kudos
181 Views
StanoA
NXP Employee
NXP Employee

Thank you for your answer.

You are welcome.

Stano.

 

0 Kudos