<?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>-DNRF52 ambiguous and incompatible with -DNRF52832_XXAB</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46567/-dnrf52-ambiguous-and-incompatible-with--dnrf52832_xxab</link><description>When working on adapting the bootloader for NRF52832_XXAB I noticed that -DNRF52 seems to define NRF52832_XXAA and later defining -DNRF52832_XXAB does not override it. I suppose -DNRF52 should be removed alltogether and the more specific -DNRF52832_XXAA</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Apr 2019 20:20:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46567/-dnrf52-ambiguous-and-incompatible-with--dnrf52832_xxab" /><item><title>RE: -DNRF52 ambiguous and incompatible with -DNRF52832_XXAB</title><link>https://devzone.nordicsemi.com/thread/183907?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 20:20:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4b59db7-c61f-422b-b351-780840a349e3</guid><dc:creator>Bruno Randolf</dc:creator><description>&lt;p&gt;I am using SDK 15.3.0 and yes, the main problem is that the old define -DNRF52 is still used in many example projects. without digging deeper into the SDK its hard to know wether -DNRF52 is needed for something or not... i think many people start their project from one example project and then it&amp;#39;s that will just get copied over and when we then want to change or refine the target gets into the way. so... please remove it from all examples!!! thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: -DNRF52 ambiguous and incompatible with -DNRF52832_XXAB</title><link>https://devzone.nordicsemi.com/thread/183811?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 12:29:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b99478f-6597-4005-89c9-d644fdff8002</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;Sure, the fix is easy, but very hard to troubleshoot if it happens. I don&amp;#39;t know about SDK15.3 since I&amp;#39;m still in 15.2, but in 15.2 -DNRF52 is defined along -DNRF52832_XXAA in a lot of example projects.&lt;/p&gt;
&lt;p&gt;I think the redefinition&amp;nbsp;doesn&amp;#39;t do as much damage as including the &amp;quot;old&amp;quot; NRF52 definition in newer example projects.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: -DNRF52 ambiguous and incompatible with -DNRF52832_XXAB</title><link>https://devzone.nordicsemi.com/thread/183803?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 12:21:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0eba1fe9-3875-4f42-9196-b0e7d53da96c</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;absolutely. As mentioned, I have reported this. The fix, however, is to remove the DNRF52 define all together, and use the NRF52XXX_XXXX define that suits your project.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: -DNRF52 ambiguous and incompatible with -DNRF52832_XXAB</title><link>https://devzone.nordicsemi.com/thread/183800?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 12:19:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef6a6f3f-fa4e-46e6-bf54-4afbf8c76aed</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;This happened to me when I was porting a project from an NRF52832 to an NRF52840. When I was changing the preprocessor definitions I just changed -DNRF52832_XXAA to -DNRF52840_XXAA and I left -DNRF52 there as I thought it was necessary for something.&lt;/p&gt;
&lt;p&gt;I can see this happening to other people, as I believe porting a project from the 832 to the 840 isn&amp;#39;t such a rare case. I hope you can see how this is a problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: -DNRF52 ambiguous and incompatible with -DNRF52832_XXAB</title><link>https://devzone.nordicsemi.com/thread/183788?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 12:07:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d27ba86-d7da-44cd-b951-98ad12e9bead</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;Exactly, that is precisely the problem.&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s say I define NRF52 and NRF52840_XXAA. This shouldn&amp;#39;t be a problem because the NRF52840 &lt;strong&gt;is&lt;/strong&gt; an NRF52.&lt;/p&gt;
&lt;p&gt;This code will define NRF52832_XXAA:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#if defined (NRF52)
    #ifndef NRF52832_XXAA
        #define NRF52832_XXAA
    #endif
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then this code will include NRF52832 files instead of NRF52840 ones, because the NRF52832 #elif is processed:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/* Device selection for device includes. */
#if defined (NRF51)
    #include &amp;quot;nrf51.h&amp;quot;
    #include &amp;quot;nrf51_bitfields.h&amp;quot;
    #include &amp;quot;nrf51_deprecated.h&amp;quot;

#elif defined (NRF52810_XXAA)
    #include &amp;quot;nrf52810.h&amp;quot;
    #include &amp;quot;nrf52810_bitfields.h&amp;quot;
    #include &amp;quot;nrf51_to_nrf52810.h&amp;quot;
    #include &amp;quot;nrf52_to_nrf52810.h&amp;quot;
#elif defined (NRF52832_XXAA) || defined (NRF52832_XXAB)
    #include &amp;quot;nrf52.h&amp;quot;
    #include &amp;quot;nrf52_bitfields.h&amp;quot;
    #include &amp;quot;nrf51_to_nrf52.h&amp;quot;
    #include &amp;quot;nrf52_name_change.h&amp;quot;
#elif defined (NRF52840_XXAA)
    #include &amp;quot;nrf52840.h&amp;quot;
    #include &amp;quot;nrf52840_bitfields.h&amp;quot;
    #include &amp;quot;nrf51_to_nrf52840.h&amp;quot;
    #include &amp;quot;nrf52_to_nrf52840.h&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As I said, this once caused me to lose &lt;strong&gt;days&lt;/strong&gt; debugging - I&amp;#39;m sure it will happen to someone else in the future if this issue is not addressed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: -DNRF52 ambiguous and incompatible with -DNRF52832_XXAB</title><link>https://devzone.nordicsemi.com/thread/183783?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 11:56:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf952fe9-78ee-4bc9-9f73-a5d4f46ead99</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thank you for your feedback.&lt;/p&gt;
&lt;p&gt;The only reference I can find to NRF52 is in nrf.h on line 51 (at least in SDK15.3.0). What SDK version do you use?&lt;/p&gt;
&lt;p&gt;I agree that it isn&amp;#39;t too intuitive to check here, and I&amp;#39;ll report this to our SDK team.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As the description says:&lt;/p&gt;
&lt;p&gt;/* Redefine &amp;quot;old&amp;quot; too-generic name NRF52 to NRF52832_XXAA to keep backwards compatibility. */&lt;/p&gt;
&lt;p&gt;So it was introduced to ease the porting from older SDKs.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can remove these lines, or alternatively change it to use the XXAB, if that is what you are using.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: -DNRF52 ambiguous and incompatible with -DNRF52832_XXAB</title><link>https://devzone.nordicsemi.com/thread/183422?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2019 11:44:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66b47b8f-6c1e-4faf-9a09-14a93d3f8a2d</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;I join the complaint. I had issues in the past with this particular definition when porting code from an NRF52832 to an NRF52840. It caused the 840 to behave as an 832.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>