<?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>TDD with SoftDevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16920/tdd-with-softdevice</link><description>I&amp;#39;m trying to use TDD for my development of a BLE peripheral application, but I&amp;#39;m running into some problems. I&amp;#39;m using Ceedling, CMock, and Unity for my TDD environment, but I&amp;#39;m running into issues mocking the SDK files. I&amp;#39;m using a standard x86 compiler</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 Oct 2016 13:25:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16920/tdd-with-softdevice" /><item><title>RE: TDD with SoftDevice</title><link>https://devzone.nordicsemi.com/thread/64855?ContentTypeID=1</link><pubDate>Fri, 07 Oct 2016 13:25:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc94be5a-c5cf-40d2-a140-5e649db9ea10</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Well &lt;code&gt;r0&lt;/code&gt; is an ARM register so if you are using an x86 environment clearly it won&amp;#39;t compile. There&amp;#39;s probably a very small part of the SDK which will compile under any OS, but anything at all which deals with the chip registers, any assembler, anything to do with the softdevice .. is not going to compile or work in any way at all.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m really not sure what you&amp;#39;re trying to accomplish here, but I don&amp;#39;t see how you&amp;#39;re going to do anything useful at all with the small part of the SDK which isn&amp;#39;t tied to the chip and the architecture.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TDD with SoftDevice</title><link>https://devzone.nordicsemi.com/thread/64856?ContentTypeID=1</link><pubDate>Fri, 07 Oct 2016 13:23:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f2fa48d-5bda-41bd-b9f4-ef269b7928fa</guid><dc:creator>Eirik Midttun</dc:creator><description>&lt;p&gt;The error happens because you call the SoftDevice using SVCs, which is an ARM architecture feature. So this won&amp;#39;t work on x86. For this to work you need to replace ble.h with a mock or fake implementation. You can also mock at a higher level, replacing the interfaces in the SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TDD with SoftDevice</title><link>https://devzone.nordicsemi.com/thread/64854?ContentTypeID=1</link><pubDate>Fri, 07 Oct 2016 13:12:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bdff50b-5f16-4778-ab13-8ffc6707b983</guid><dc:creator>Definitely Confused</dc:creator><description>&lt;p&gt;I added example code and sample error messages. I thought cmock was generating the mocks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TDD with SoftDevice</title><link>https://devzone.nordicsemi.com/thread/64853?ContentTypeID=1</link><pubDate>Fri, 07 Oct 2016 12:40:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae5ea035-8916-41b9-a63f-736305955fb6</guid><dc:creator>Eirik Midttun</dc:creator><description>&lt;p&gt;Hard to help with so little information. You should at least paste a complete error message, including the file and line number. Are you including SDK files in the &amp;quot;mock_ble&amp;quot; module? Which ones?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TDD with SoftDevice</title><link>https://devzone.nordicsemi.com/thread/64852?ContentTypeID=1</link><pubDate>Fri, 07 Oct 2016 12:16:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81dca04a-f405-468d-bb92-cc7f245bcd63</guid><dc:creator>Definitely Confused</dc:creator><description>&lt;p&gt;I&amp;#39;m not quite sure I understand. As soon as I try to compile with &amp;#39;#include &amp;quot;mock_ble.h&amp;quot;&amp;#39; in the test*.c file, I get a torrent of compiler errors when running &amp;quot;rake test:all&amp;quot; Most of them (they flow off the terminal window) mention an unknown register r0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TDD with SoftDevice</title><link>https://devzone.nordicsemi.com/thread/64851?ContentTypeID=1</link><pubDate>Fri, 07 Oct 2016 12:14:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61707eaa-419e-4548-84c8-4ee8894db874</guid><dc:creator>Eirik Midttun</dc:creator><description>&lt;p&gt;The tools work just fine. I don&amp;#39;t think you have other concerns than breaking dependencies in the SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TDD with SoftDevice</title><link>https://devzone.nordicsemi.com/thread/64850?ContentTypeID=1</link><pubDate>Fri, 07 Oct 2016 12:08:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1191a342-f2d4-47ac-b2e4-e5f4856f988c</guid><dc:creator>Definitely Confused</dc:creator><description>&lt;p&gt;They are included because of dependencies. I really just want to make sure certain functions are called; I&amp;#39;m not concerned with their workings.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TDD with SoftDevice</title><link>https://devzone.nordicsemi.com/thread/64849?ContentTypeID=1</link><pubDate>Fri, 07 Oct 2016 12:06:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49d55b3f-4b04-4021-a0c4-8e412f8b884a</guid><dc:creator>Eirik Midttun</dc:creator><description>&lt;p&gt;Which files are you referring to? And are they relevant for the mock, or included because of dependencies?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>