<?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>Example code utilizing softdevice will not work properly with IAR compiled hex</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20975/example-code-utilizing-softdevice-will-not-work-properly-with-iar-compiled-hex</link><description>Hello, 
 I have an issue regarding using IAR tools with the examples provided in SDK v13. 
 I have: 
 
 
 nRF52840 Preview DK 
 
 
 v13 of the nordic SDK ( www.nordicsemi.com/.../nRF5-SDK) 
 
 
 IAR v8.10.1 with full license 
 
 
 Issue</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 Apr 2017 08:47:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20975/example-code-utilizing-softdevice-will-not-work-properly-with-iar-compiled-hex" /><item><title>RE: Example code utilizing softdevice will not work properly with IAR compiled hex</title><link>https://devzone.nordicsemi.com/thread/81978?ContentTypeID=1</link><pubDate>Thu, 06 Apr 2017 08:47:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bee9df1a-1892-4bf8-a1cf-b775ae9dce2a</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;I have attached a patched version of nrf_delay in &lt;a href="https://devzone.nordicsemi.com/question/126260/iar-810-produce-bugs-when-compiling-nrf_delay_us/?answer=126268#post-id-126268"&gt;this answer&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example code utilizing softdevice will not work properly with IAR compiled hex</title><link>https://devzone.nordicsemi.com/thread/81977?ContentTypeID=1</link><pubDate>Tue, 04 Apr 2017 15:02:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9872608-5e3f-4042-a9cb-944500d41aba</guid><dc:creator>lbehhhh</dc:creator><description>&lt;p&gt;Admittedly I am no ARM instruction set or compiler expert, but there is a problem with the way the latest IAR toolset is dealing with the asm code block in nrf_delay.h -&amp;gt; nrf_delay_us() function call.&lt;/p&gt;
&lt;p&gt;We are currently working with IAR and you guys to resolve this.&lt;/p&gt;
&lt;p&gt;One work around is to add/edit these two lines to the nrf_delay.h -&amp;gt; nrf_delay_us function:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&amp;quot;SUBS %0, %0, #1\n&amp;quot; --&amp;gt; Replace %0 with %1 in both locations&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;add this to the input operand list:  [number_of_us] &amp;quot;r&amp;quot; (number_of_us),&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This will break the loop I was stuck in.  However this does not guarantee that the rest of the project is &amp;#39;safe&amp;#39; since there may be other asm volatile sections (I havent looked yet) that are not acting as expected.  Sigurd is correct, reverting to v7.20.2 did aslo fix the problem.&lt;/p&gt;
&lt;p&gt;I will update this blog when I/we find out more.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example code utilizing softdevice will not work properly with IAR compiled hex</title><link>https://devzone.nordicsemi.com/thread/81976?ContentTypeID=1</link><pubDate>Tue, 04 Apr 2017 14:46:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e2c1595-d9c9-48cc-97ae-80a4fb069062</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi lbehhhh,&lt;/p&gt;
&lt;p&gt;We have had some reports with issues relating to IAR version 8. If you still are having problems with IAR version 8, I would recommend to downgrade to version 7 for now if possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example code utilizing softdevice will not work properly with IAR compiled hex</title><link>https://devzone.nordicsemi.com/thread/81971?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2017 22:47:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fff038c-a5fc-4f4f-b50a-2329059ca7af</guid><dc:creator>Daniel Wang</dc:creator><description>&lt;p&gt;Did you install the &lt;a href="https://www.nordicsemi.com/eng/nordic/Products/nRF52-DK/nRF5x-MDK-IAR/51502"&gt;nRF-MDK for IAR&lt;/a&gt; ? Newest version is 8.12.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example code utilizing softdevice will not work properly with IAR compiled hex</title><link>https://devzone.nordicsemi.com/thread/81970?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2017 07:51:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63a782d7-f0df-494f-8769-8f82adbadef2</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Does LED1 blink when you used the hex compiled with IAR? What J-Link version do you have? Note that support for nRF52840/PCA10056 was added in J-Link V6.12c.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example code utilizing softdevice will not work properly with IAR compiled hex</title><link>https://devzone.nordicsemi.com/thread/81975?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2017 18:41:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d77c910c-cd79-4580-af71-f2ba10d1a481</guid><dc:creator>lbehhhh</dc:creator><description>&lt;p&gt;I started off using the defaults from the project, which are:&lt;/p&gt;
&lt;p&gt;define symbol &lt;strong&gt;ICFEDIT_region_ROM_start&lt;/strong&gt;   = 0x22000;&lt;/p&gt;
&lt;p&gt;define symbol &lt;strong&gt;ICFEDIT_region_ROM_end&lt;/strong&gt;     = 0xfffff;&lt;/p&gt;
&lt;p&gt;define symbol &lt;strong&gt;ICFEDIT_region_RAM_start&lt;/strong&gt;   = 0x20002620;&lt;/p&gt;
&lt;p&gt;define symbol &lt;strong&gt;ICFEDIT_region_RAM_end&lt;/strong&gt;     = 0x2003ffff;&lt;/p&gt;
&lt;p&gt;I was just looking at this post (&lt;a href="https://devzone.nordicsemi.com/question/55887/nrf52832-loop-while-calling-sd_softdevice_enable/)"&gt;devzone.nordicsemi.com/.../)&lt;/a&gt; and am trying to change these, but have had no success so far.  Also please note that I am hanging in nrf_delay.h on a bunch of NOP assembly instructions (around line 172)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example code utilizing softdevice will not work properly with IAR compiled hex</title><link>https://devzone.nordicsemi.com/thread/81974?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2017 18:37:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba7b759d-1f3e-4428-be9d-ca09448c7115</guid><dc:creator>Daniel Wang</dc:creator><description>&lt;p&gt;What ROM/RAM start/end &lt;a href="https://devzone.nordicsemi.com/attachment/0432e6f6ecd3d18008a48ddb6e9cddf0"&gt;values&lt;/a&gt; are you using in the IAR project? For HRM is should be:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;FLASH (rx) : ORIGIN = 0x22000, LENGTH = 0xde000
RAM (rwx) :  ORIGIN = 0x20002620, LENGTH = 0x3d9e0
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example code utilizing softdevice will not work properly with IAR compiled hex</title><link>https://devzone.nordicsemi.com/thread/81973?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2017 18:08:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84ce8ff8-4cd7-450d-b46e-b6b7bf8d485f</guid><dc:creator>lbehhhh</dc:creator><description>&lt;p&gt;No, flashing from within IAR does not work, nor does flashing the compiled hex file from IAR with nRFgo studio work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Example code utilizing softdevice will not work properly with IAR compiled hex</title><link>https://devzone.nordicsemi.com/thread/81972?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2017 16:58:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d97cb36-36e8-4d6d-a246-c1c13fcda909</guid><dc:creator>Daniel Wang</dc:creator><description>&lt;p&gt;The problem is only when you debug with IAR? flashing the application with IAR also works?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>