<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HCS12 weak attribute in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS12-weak-attribute/m-p/1500250#M15723</link>
    <description>&lt;P&gt;Hello again,&lt;/P&gt;&lt;P&gt;Thank you for your answer &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/23056"&gt;@stanish&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I want to test a function (e.g. source.c) and mock (by cmock) one of the functions that are called in source.c .&lt;/P&gt;&lt;P&gt;now I have two function with similar name (i.e. original version of function and its fake or mock),&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my test file (test.c) I want to weak the&amp;nbsp;original version of function and use its mock.&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;/* source.c */&lt;/P&gt;&lt;P&gt;int func_1 (void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; int x = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; int y = 12;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; int z = func_call_1 (x,y);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; return z;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;/*&amp;nbsp;func_2.c */&lt;/P&gt;&lt;P&gt;int func_call_1(int x, int y)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;//do somthing&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;now in my mock file I have also a fake function with the name of&amp;nbsp;func_call_1,&lt;/P&gt;&lt;P&gt;how I can run&amp;nbsp;func_call_1 in my mock and not in&amp;nbsp;func_2.c ?&lt;/P&gt;&lt;P&gt;in a normal situation weak attribute could did it.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Aug 2022 11:48:27 GMT</pubDate>
    <dc:creator>MM158</dc:creator>
    <dc:date>2022-08-03T11:48:27Z</dc:date>
    <item>
      <title>HCS12 weak attribute</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS12-weak-attribute/m-p/1498810#M15719</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm working with HCS12 in CodeWarrior 5.9.0, and i try to use "weak" function attribute.&lt;/P&gt;&lt;P&gt;I don't find any clear statement (or example) on HCS12, that this attribute is available or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there is not, can you help me how can I find an alternative for it.&lt;/P&gt;&lt;P&gt;Can you help me on this subject?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 12:15:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS12-weak-attribute/m-p/1498810#M15719</guid>
      <dc:creator>MM158</dc:creator>
      <dc:date>2022-08-01T12:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: HCS12 weak attribute</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS12-weak-attribute/m-p/1500069#M15720</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm affraid that weak attribute is not supported by HCs12 Compiler/Linker. Could you possibly describe the issue you are trying to solve by using weak attribute? Perhaprs there might be some wokaround to achieve a similar link behavior.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Stan&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 07:51:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS12-weak-attribute/m-p/1500069#M15720</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2022-08-03T07:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: HCS12 weak attribute</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS12-weak-attribute/m-p/1500250#M15723</link>
      <description>&lt;P&gt;Hello again,&lt;/P&gt;&lt;P&gt;Thank you for your answer &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/23056"&gt;@stanish&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I want to test a function (e.g. source.c) and mock (by cmock) one of the functions that are called in source.c .&lt;/P&gt;&lt;P&gt;now I have two function with similar name (i.e. original version of function and its fake or mock),&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my test file (test.c) I want to weak the&amp;nbsp;original version of function and use its mock.&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;/* source.c */&lt;/P&gt;&lt;P&gt;int func_1 (void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; int x = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; int y = 12;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; int z = func_call_1 (x,y);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; return z;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;/*&amp;nbsp;func_2.c */&lt;/P&gt;&lt;P&gt;int func_call_1(int x, int y)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;//do somthing&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;now in my mock file I have also a fake function with the name of&amp;nbsp;func_call_1,&lt;/P&gt;&lt;P&gt;how I can run&amp;nbsp;func_call_1 in my mock and not in&amp;nbsp;func_2.c ?&lt;/P&gt;&lt;P&gt;in a normal situation weak attribute could did it.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 11:48:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS12-weak-attribute/m-p/1500250#M15723</guid>
      <dc:creator>MM158</dc:creator>
      <dc:date>2022-08-03T11:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: HCS12 weak attribute</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS12-weak-attribute/m-p/1501618#M15725</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not absolutely sure I understand but it leads me to conditional compilation.&amp;nbsp; ifdef ifndef&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Ladislav&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 07:19:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS12-weak-attribute/m-p/1501618#M15725</guid>
      <dc:creator>lama</dc:creator>
      <dc:date>2022-08-05T07:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: HCS12 weak attribute</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS12-weak-attribute/m-p/1501622#M15726</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am very sorry, I was informed from responsible department,&amp;nbsp; I was asking, this is an internal and confidential information.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Ladislav&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 07:24:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HCS12-weak-attribute/m-p/1501622#M15726</guid>
      <dc:creator>lama</dc:creator>
      <dc:date>2022-08-05T07:24:17Z</dc:date>
    </item>
  </channel>
</rss>

