<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>CMock Failed Parsing Declaration Prototype</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73164/cmock-failed-parsing-declaration-prototype</link><description>Hello guys, looking forward to some help here! 
 I&amp;#39;ve been working on a Unit Test system setup with CMock + Unity for a BLE app. But when I try CMocking some headers in the nrf sdk(eg. nrf_erratas.h), I get a &amp;quot;Failed Parsing Declaration Prototype&amp;quot; Error</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Mar 2021 11:29:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73164/cmock-failed-parsing-declaration-prototype" /><item><title>RE: CMock Failed Parsing Declaration Prototype</title><link>https://devzone.nordicsemi.com/thread/301875?ContentTypeID=1</link><pubDate>Thu, 25 Mar 2021 11:29:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85c5394e-f569-4210-b729-de66aba97593</guid><dc:creator>Krzysztof Chruscinski</dc:creator><description>&lt;p&gt;If that is the case, I won&amp;#39;t be able to help you much. We are using cmock in nrf5 sdk and we did some modifications but they are coupled with our internal test frameworks and cannot be easily shared. You can try to take the path from nRF Connect SDK where instead of modifying cmock we are pre-parsing header file and fix things there, e.g. convert static inlines to function declarations. Then, in the test this artificial header should be used instead of original one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CMock Failed Parsing Declaration Prototype</title><link>https://devzone.nordicsemi.com/thread/301843?ContentTypeID=1</link><pubDate>Thu, 25 Mar 2021 10:05:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ddf3a63-7424-4d7f-b8a0-a24be85811f7</guid><dc:creator>Aleksa</dc:creator><description>&lt;p&gt;nRF5 SDK&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Aleksa&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CMock Failed Parsing Declaration Prototype</title><link>https://devzone.nordicsemi.com/thread/301842?ContentTypeID=1</link><pubDate>Thu, 25 Mar 2021 10:04:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7890440d-5298-4415-b6ff-42d217e90258</guid><dc:creator>Krzysztof Chruscinski</dc:creator><description>&lt;p&gt;What context is that? nRF5 SDK or nRF Connect SDK?&lt;/p&gt;
&lt;p&gt;regards,&lt;/p&gt;
&lt;p&gt;Krzysztof&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CMock Failed Parsing Declaration Prototype</title><link>https://devzone.nordicsemi.com/thread/301742?ContentTypeID=1</link><pubDate>Wed, 24 Mar 2021 15:33:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c575a422-57a4-4df9-842f-0a8395b14f9a</guid><dc:creator>Aleksa</dc:creator><description>&lt;p&gt;I&amp;#39;ve tried using makefiles to call the ruby script that mocks header files.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But I don&amp;#39;t understand what does the preprocessing do to macros, because they still don&amp;#39;t get through the parsing .rb script even if I try to use scripts given in the /sdk-nrf/scripts/unity to preprocess them.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CMock Failed Parsing Declaration Prototype</title><link>https://devzone.nordicsemi.com/thread/301674?ContentTypeID=1</link><pubDate>Wed, 24 Mar 2021 12:46:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aff75cda-131e-4970-bc81-1b89e42796b8</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Alesksa,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you&amp;nbsp;&lt;span&gt;edit&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span&gt;CMakeLists.txt&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;to call&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span&gt;cmock_handle&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;with the header file and, optionally, the relative path to the header as arguments as the &lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_unity_testing.html#setting-up-a-unit-test"&gt;doc&lt;/a&gt;?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CMock Failed Parsing Declaration Prototype</title><link>https://devzone.nordicsemi.com/thread/301647?ContentTypeID=1</link><pubDate>Wed, 24 Mar 2021 11:07:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8994c4ba-3212-4eda-8708-9a2f9e86b60f</guid><dc:creator>Aleksa</dc:creator><description>&lt;p&gt;When I try running these two scripts in /sdk-nrf/scripts/unity, I get the same output macros as they were before, and I still get the same error from cmock_header_parser.rb&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>