<?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>Hard-Fault on any interrupt in s110 soft device on nRF51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1542/hard-fault-on-any-interrupt-in-s110-soft-device-on-nrf51822</link><description>We have a custom nrf15822-AA board flashed with the S110 (6.0.0) and our application. It has a 32khz crystal. It is connect to our (Mac) development systems with a SEGGER J-Link Ultra+. 
 Using GCC 4.7.4 and J-Link on the command line, all works fine</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 21 Mar 2014 18:00:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1542/hard-fault-on-any-interrupt-in-s110-soft-device-on-nrf51822" /><item><title>RE: Hard-Fault on any interrupt in s110 soft device on nRF51822</title><link>https://devzone.nordicsemi.com/thread/6838?ContentTypeID=1</link><pubDate>Fri, 21 Mar 2014 18:00:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82121a55-1dd1-44e8-ba10-91a50b446e10</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;This is really an separate question that would have been better off separately. However, with IAR you can try adding &amp;quot;--drv_vector_table_base=0x0&amp;quot; in Options &amp;gt; Debugger &amp;gt; Extra Options &amp;gt; Command line options. Also make sure to use a recent version, at least 6.60.3.&lt;/p&gt;
&lt;p&gt;If you have further problems, please post a separate question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard-Fault on any interrupt in s110 soft device on nRF51822</title><link>https://devzone.nordicsemi.com/thread/6837?ContentTypeID=1</link><pubDate>Fri, 21 Mar 2014 08:58:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bddc11a5-c4d4-4cde-a552-612b2c3d4679</guid><dc:creator>chang sheng lung</dc:creator><description>&lt;p&gt;hi Ole,&lt;/p&gt;
&lt;p&gt;I have the same problem, and the IDE I am using is IAR. could you provide more info for me the fix the issue.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard-Fault on any interrupt in s110 soft device on nRF51822</title><link>https://devzone.nordicsemi.com/thread/6836?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2014 21:31:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:946a4675-1e8d-4e16-8eb8-528cdaf5df77</guid><dc:creator>Ward WIllats</dc:creator><description>&lt;p&gt;You were correct, Ole.  Thank you.&lt;/p&gt;
&lt;p&gt;I am using a preview of Crossworks 3 which will be released very soon. It has a BSP for the nrf51822. So everything I say here is related to that.&lt;/p&gt;
&lt;p&gt;The debugger directly loads the entry point address unless you go into the property sheet for the &lt;em&gt;project&lt;/em&gt; and set the &lt;strong&gt;Entry Point Symbol&lt;/strong&gt; in the &lt;strong&gt;Debugger Options&lt;/strong&gt; to a non-existent symbol. In my case I used &amp;quot;doesnotexist&amp;quot; -- once this is done, the debugger will start execution at 0x4 instead of 0x14004.&lt;/p&gt;
&lt;p&gt;The early descriptive text in the BSP beta I first had did not make this clear. This text has since been made better.&lt;/p&gt;
&lt;p&gt;You must also:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Relocate the image to 0x00014000 by setting the &lt;em&gt;project&lt;/em&gt; property &lt;strong&gt;Section Placement Macros&lt;/strong&gt; in the &lt;strong&gt;Linker Options&lt;/strong&gt; to: FLASH_START=0x14000;RAM_START=0x20002000&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Optional: move the shared stack to the top of (AA) RAM. I chose a 2K stack, 1.5K for SoftDevice and 500 bytes for us. I did this by importing the flash_placement.xml file into the project (context-click and choose &lt;em&gt;import&lt;/em&gt;) and adding a start=&amp;quot;0x20003800&amp;quot; attribute to the .stack  element.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Optional (but it made me feel better): Change the reset_handler: in Rowley&amp;#39;s nRF51_Startup.s to point the initial SP for SystemInit to 0x20004000. Otherwise, SystemInit will run using a stack at the top of the SoftDevice&amp;#39;s reserved RAM.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Define STARTUP_FROM_RESET in the file properties for nRF51_Startup.s&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We are a strange shop in that we like to develop embedded on Macintosh, in C++, with one of the smaller players in the tools market. For us, Crossworks performs very well, is nicely thought out, and we find the company much nicer to deal with than the 2 market leaders in the ARM tools world. But  this default behavior of the debugger was certainly non-intuitive to me, even though I understand it now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard-Fault on any interrupt in s110 soft device on nRF51822</title><link>https://devzone.nordicsemi.com/thread/6835?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2014 12:01:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfa3ce99-18e3-4ca9-b523-291208aa2055</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;Could it be that Rowley doesn&amp;#39;t reset the chip properly? It seems it&amp;#39;s likely that it fails in this way if the forward address hasn&amp;#39;t been set correctly, and this may happen if the softdevice&amp;#39;s reset handler haven&amp;#39;t been run.&lt;/p&gt;
&lt;p&gt;I&amp;#39;d hence recommend you to see if you have any way of controlling where the debugger starts the chip, and if you do, make sure that it starts at the reset handler on address 0x04, not on 0x14004. Adding an additional debugger-initiated reset right after launch may also help, but I&amp;#39;m not familiar with Rowley so I can&amp;#39;t say exactly how you can do this.&lt;/p&gt;
&lt;p&gt;We&amp;#39;ve previously seen this issue with both Eclipse and IAR, and I&amp;#39;m honestly a little surprised that the IDEs do this, since a Cortex M0 will by spec always start at 0x0 when free-running. The similar question for Eclipse is &lt;a href="https://devzone.nordicsemi.com/index.php/strange-behaviour-with-nrf51822-and-s110"&gt;here&lt;/a&gt;, but the IAR case was handled in the regular support system, so I can&amp;#39;t link to details.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>