S12Z weak function

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S12Z weak function

Jump to solution
2,924 Views
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 Kudos
1 Solution
2,891 Views
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.

View solution in original post

0 Kudos
7 Replies
2,911 Views
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 Kudos
2,908 Views
StanoA
NXP TechSupport
NXP TechSupport

You are welcome.

0 Kudos
2,918 Views
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 Kudos
2,901 Views
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 Kudos
2,892 Views
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 Kudos
2,888 Views
francoisdugue
Contributor III

Hi,

So, we have the same conclusion.

S12Z toolchain doesn't support weak function attribute.

Thank you for your support.

 

0 Kudos
2,884 Views
StanoA
NXP TechSupport
NXP TechSupport

Thank you for your answer.

You are welcome.

Stano.

 

0 Kudos