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.
Solved! Go to Solution.
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.
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
You are welcome.
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.
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.
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.
Hi,
So, we have the same conclusion.
S12Z toolchain doesn't support weak function attribute.
Thank you for your support.
Thank you for your answer.
You are welcome.
Stano.