<?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>S130 seems to be stuck before even reaching main</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7612/s130-seems-to-be-stuck-before-even-reaching-main</link><description>I am trying to run a NRF51822 chip using Emblocks and OpenOCD, the debugger interface is a ST-Link from a Discovery board, which supports SWD. 
 When I program the Blank device everything works fine, the program flow reaches the main function. However</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 14 Jun 2015 13:25:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7612/s130-seems-to-be-stuck-before-even-reaching-main" /><item><title>RE: S130 seems to be stuck before even reaching main</title><link>https://devzone.nordicsemi.com/thread/27153?ContentTypeID=1</link><pubDate>Sun, 14 Jun 2015 13:25:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31bf1206-4024-488e-ba9f-e47ba1a203e5</guid><dc:creator>dmg213</dc:creator><description>&lt;p&gt;The problem is the linker file provided with Emblocks.&lt;/p&gt;
&lt;p&gt;I got it working by modifying the sections in the linker file from this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;MEMORY
{
  SOFTD (rx) : ORIGIN = 0x00000000, LENGTH = 0x20000
  FLASH (rx) : ORIGIN = 0x00020000, LENGTH = 0x20000
  RAM (rwx) :  ORIGIN = 0x20002800, LENGTH = 0x1800
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;MEMORY
{
  SOFTD (rx) : ORIGIN = 0x00000000, LENGTH = 0x1C000
  FLASH (rx) : ORIGIN = 0x0001C000, LENGTH = 0x24000
  RAM (rwx) :  ORIGIN = 0x20002800, LENGTH = 0x1800
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now the program flow reaches main, I hope I don&amp;#39;t run into any more issues!&lt;/p&gt;
&lt;p&gt;Many thanks to everyone who contributed, you saved me a lot of time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S130 seems to be stuck before even reaching main</title><link>https://devzone.nordicsemi.com/thread/27152?ContentTypeID=1</link><pubDate>Sun, 14 Jun 2015 13:22:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1adea85-ef8d-4055-b6a5-5fd9b84bb25f</guid><dc:creator>dmg213</dc:creator><description>&lt;p&gt;Many thanks @RK and @Nguyen_Hoan_Hoang, I got it working, I will post the solution as an answer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S130 seems to be stuck before even reaching main</title><link>https://devzone.nordicsemi.com/thread/27151?ContentTypeID=1</link><pubDate>Sun, 14 Jun 2015 12:38:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3e66e7d-0bb4-46a0-8666-6f19624ba765</guid><dc:creator>dmg213</dc:creator><description>&lt;p&gt;I have added more information, thank you for your time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S130 seems to be stuck before even reaching main</title><link>https://devzone.nordicsemi.com/thread/27150?ContentTypeID=1</link><pubDate>Sun, 14 Jun 2015 11:50:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b417039b-aa1a-462d-9a5b-144627fb4b72</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;No that&amp;#39;s actually correct - if you check the hex file you&amp;#39;ll see it&amp;#39;s in two chunks, one from 0x00 to 0x7C0 and one from 0x1000 to 0x1b4d8 (or something like that). The piece at 0x00 is the bootloader I suspect. So having 0xff in memory from 0x7C0 to 0cfff is right. Question is .. do you have the second piece flashed from 0x1000 onwards?&lt;/p&gt;
&lt;p&gt;The code you compiled and uploaded is compiled to start at what address? The alpha versions of S130 needed it at 0x1d000 (well apart from the very early alpha) but the production one wants it at 0x1c000, so it matter which one you flashed and which one you&amp;#39;re building for.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S130 seems to be stuck before even reaching main</title><link>https://devzone.nordicsemi.com/thread/27149?ContentTypeID=1</link><pubDate>Sun, 14 Jun 2015 11:42:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5afeb8ff-08e5-4f91-ad1c-0b0bb70822ea</guid><dc:creator>dmg213</dc:creator><description>&lt;p&gt;Thanks for your input, I have added more information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S130 seems to be stuck before even reaching main</title><link>https://devzone.nordicsemi.com/thread/27148?ContentTypeID=1</link><pubDate>Sun, 14 Jun 2015 06:34:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:020edb16-e82f-4ec3-9a95-f9f848464f66</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;Have you flashed in the s130 softdevice ? Looks like softdevice is missing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>