<?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 Mocking peripherals for unit testing in MCUXpresso General</title>
    <link>https://community.nxp.com/t5/MCUXpresso-General/Mocking-peripherals-for-unit-testing/m-p/613179#M12</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been experimenting with using unity as a unit-testing tool, together with ceedling and cmock, against code developed with SDK2.1. I have only succeeded in getting trivial tests working before running into issues involving drivers. It seems as if cmock fails on &lt;EM&gt;static inline&lt;/EM&gt; functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone managed to properly harness a project built on SDK2.1 or SDK2.2? I am not specifically tied to unity/ceedling/cmock. I would be happy with any tool that manages to penetrate the layers of register definitions and operations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Mar 2017 09:08:18 GMT</pubDate>
    <dc:creator>gmb</dc:creator>
    <dc:date>2017-03-23T09:08:18Z</dc:date>
    <item>
      <title>Mocking peripherals for unit testing</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Mocking-peripherals-for-unit-testing/m-p/613179#M12</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been experimenting with using unity as a unit-testing tool, together with ceedling and cmock, against code developed with SDK2.1. I have only succeeded in getting trivial tests working before running into issues involving drivers. It seems as if cmock fails on &lt;EM&gt;static inline&lt;/EM&gt; functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone managed to properly harness a project built on SDK2.1 or SDK2.2? I am not specifically tied to unity/ceedling/cmock. I would be happy with any tool that manages to penetrate the layers of register definitions and operations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Mar 2017 09:08:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Mocking-peripherals-for-unit-testing/m-p/613179#M12</guid>
      <dc:creator>gmb</dc:creator>
      <dc:date>2017-03-23T09:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Mocking peripherals for unit testing</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Mocking-peripherals-for-unit-testing/m-p/613180#M13</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Greg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to do the same thing as you, use ceedling to write some tests for drivers/applications/... that use the KSDK.&lt;/P&gt;&lt;P&gt;Unfortunatelly, I also have issues with 'static inline' functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know how you did it, but I just did a workaround by declaring my own mock-headers of the KSDK.&lt;/P&gt;&lt;P&gt;The API of the SDK won't change that quick/much so I guess it's safe to copy the original KSDK header and replace the 'static inline' functions with 'normal' function declarations (without static inline).&lt;/P&gt;&lt;P&gt;That way, CMock recognizes them as a regular function and makes mocks out of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if the API of the SDK changes, I would have to change my code anyway, so I guess this is a 'safe' workaround.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you found another tool that can better handle this, let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;KR,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Laurens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2017 15:40:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Mocking-peripherals-for-unit-testing/m-p/613180#M13</guid>
      <dc:creator>laurensmiers</dc:creator>
      <dc:date>2017-10-25T15:40:19Z</dc:date>
    </item>
  </channel>
</rss>

