<?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>Which SDK11 gcc examples work with nRF51822?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16149/which-sdk11-gcc-examples-work-with-nrf51822</link><description>I think similar issues have been posted before and not resolved 
 If I flash the hex precompiled hex files for virtually any project by using the pca10028 S130 version it works fine 
 e.g.
examples\ble_peripheral\ble_app_hrs\hex\ble_app_hrs_s130_pca10028</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Sep 2016 00:14:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16149/which-sdk11-gcc-examples-work-with-nrf51822" /><item><title>RE: Which SDK11 gcc examples work with nRF51822?</title><link>https://devzone.nordicsemi.com/thread/61598?ContentTypeID=1</link><pubDate>Fri, 09 Sep 2016 00:14:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a095a139-1cbe-4bee-a00d-3d7c8bf67e19</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;I have now managed to get some examples to work on my nRF51822QFAAH0 device&lt;/p&gt;
&lt;p&gt;The HRS example works but the proximity will not compile as it takes more RAM than is available.&lt;/p&gt;
&lt;p&gt;Using the PCA10028 board as the base..&lt;/p&gt;
&lt;p&gt;I changed the linker file as suggested to ..&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;MEMORY
{
  FLASH (rx) : ORIGIN = 0x1b000, LENGTH = 0x25000
  RAM (rwx) :  ORIGIN = 0x20002080, LENGTH = 0x1f80
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(I reduced the LENGTH value by 0x4000 hex)&lt;/p&gt;
&lt;p&gt;I am not sure why this solution didn&amp;#39;t originally seem to work. But I retested with a clean copy of SDK11 and it is now OK&lt;/p&gt;
&lt;p&gt;Note. Examples that take more than 1f80 of RAM will simply not compile (link), which is understandable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which SDK11 gcc examples work with nRF51822?</title><link>https://devzone.nordicsemi.com/thread/61593?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2016 04:30:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02b8752f-5dc4-426d-b3b0-1ac774df9122</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;Thanks Einar&lt;/p&gt;
&lt;p&gt;I was not aware that older nRF51822QFAA were incompatible with SD V2.
I checked and the device I was using is QFAAH however I also have some modules by &amp;quot;Wiress-tag&amp;quot; (of china), which use the older QFAAG3 device
So I will not use those with SD V2&lt;/p&gt;
&lt;p&gt;I think I will need to leave this question open until I have worked out why changing the HRS will run from your precompiled HEX file but will not run when I compile using armgcc (even after changing the RAM linker settings that you posted)&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Roger&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which SDK11 gcc examples work with nRF51822?</title><link>https://devzone.nordicsemi.com/thread/61592?ContentTypeID=1</link><pubDate>Tue, 06 Sep 2016 12:04:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc876346-444e-4d28-a6cd-c6ced83edb33</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Regarding the different RAM usage by the SoftDevice for different examples, this is something that was introduced in S130 version 2. Depending on how the SoftDevice is configured, it will require different amounts of RAM. This is described in the &lt;a href="https://www.nordicsemi.com/eng/nordic/Products/nRF52832/S132-SD-v2/51479"&gt;S130 v2 release notes&lt;/a&gt;. If you enable logging and use a debugger, the SoftDevice will output the &amp;quot;correct&amp;quot; ram start address, as described in the release notes. If you use an example and does not modify it significantly (no more connections etc.), you should not have to change the start address.&lt;/p&gt;
&lt;p&gt;In what way does it not work? As long as you set aside (at least) enough RAM for the SoftDevice, you should be OK. If there is not enough RAM left for the application, you should get an error during linking.&lt;/p&gt;
&lt;p&gt;What is the rest of the marking on the 16 kB RAM chips you have? There are 3 generations of QFAA devices, and the latest SDK and SoftDevice are only compatible with the 3rd generation, marked &amp;quot;QFAAH..&amp;quot;. &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf51/dita/nrf51/compatibility_matrix/nRF51422_nRF51822_ic_rev_sdk_sd_comp_matrix.html?cp=3_0_3"&gt;See nRF51 Series IC revisions compatibility with SDK and SoftDevices&lt;/a&gt; for details.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which SDK11 gcc examples work with nRF51822?</title><link>https://devzone.nordicsemi.com/thread/61597?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2016 23:46:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fc508f6-6247-4ae1-8ffd-b4918fbd56d3</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;BTW. I looked at the IAR project files and the settings appear to be the same values as gcc&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;define symbol __ICFEDIT_region_RAM_start__   = 0x20002080;
define symbol __ICFEDIT_region_RAM_end__     = 0x20007fff;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note. This start address is still different from the start address in the Beacon example&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which SDK11 gcc examples work with nRF51822?</title><link>https://devzone.nordicsemi.com/thread/61596?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2016 23:18:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b63bab56-8c23-4557-9079-bb096586b05b</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;OK.&lt;/p&gt;
&lt;p&gt;I tried the nRF51822 QFAC board, and it does work with the existing pca10028&lt;/p&gt;
&lt;p&gt;But changing the RAM settings in the linker file didnt make it work for the AF AA (16k device)&lt;/p&gt;
&lt;p&gt;Looking at the RAM settings for ble_peripheral\ble_app_hrs\pca10028 (SDK11)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  RAM (rwx) :  ORIGIN = 0x20002080, LENGTH = 0x5f80
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Both the RAM origin and also the LENGTH are different from the ble beacon example&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  RAM (rwx) :  ORIGIN = 0x20001870, LENGTH = 0x2790
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So I tried using the RAM settings for the pca10028 but deducted 16k from the LENGTH&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  RAM (rwx) :  ORIGIN = 0x20002080, LENGTH = 0x1f80
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It looks like the SD has been allocated more RAM in pca10026 than the SD for the Beacon, but they are both using S130 SD, so I&amp;#39;m not sure why this is different.&lt;/p&gt;
&lt;p&gt;However this didn&amp;#39;t work either :-(&lt;/p&gt;
&lt;p&gt;Perhaps the hrs will not run in 16k RAM.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which SDK11 gcc examples work with nRF51822?</title><link>https://devzone.nordicsemi.com/thread/61595?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2016 12:01:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47abf5c0-942a-4c41-baaf-b50d38a6784a</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;You are right, GCC places the stack in the end of the RAM.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which SDK11 gcc examples work with nRF51822?</title><link>https://devzone.nordicsemi.com/thread/61594?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2016 11:51:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d053576-f9b6-4b4b-a314-2157da75c66b</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;I just checked the 2 boards I was trying and you are right.  They were fitted with AA not AC devices.&lt;/p&gt;
&lt;p&gt;I have 6 development boards from WaveShare and the first 2 both had AC devices, so I assumed all the other boards were also AC versions.&lt;/p&gt;
&lt;p&gt;But it looks like somewhere in the supply chain, someone decided to use AA versions to reduce costs.&lt;/p&gt;
&lt;p&gt;I will try the boards with AC devices and then change the linker file and retest on the AA devices.&lt;/p&gt;
&lt;p&gt;BTW. perhaps GCC puts the stack near the end of RAM&lt;/p&gt;
&lt;p&gt;Anyway, I will double check and mark the question as Answered if that fixes the problem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which SDK11 gcc examples work with nRF51822?</title><link>https://devzone.nordicsemi.com/thread/61591?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2016 10:59:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbf83938-115b-46fe-a050-59dda6f8a082</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I suspect you have a device with 16 kB RAM (which is the case for the pca20006 board). Then you must modify your linker script appropriately. Taking the HRS example in SDK 11, this is &amp;lt;SDK&amp;gt;examples\ble_peripheral\ble_app_hrs\pca10028\s130\armgcc\ble_app_hrs_gcc_nrf51.ld. There you need to take the RAM LENGTH and subtract 0x4000, as the existing value is for a 32 kB RAM part.&lt;/p&gt;
&lt;p&gt;That means that you should change line 9 from this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  RAM (rwx) :  ORIGIN = 0x20001870, LENGTH = 0x6790
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  RAM (rwx) :  ORIGIN = 0x20001870, LENGTH = 0x2790
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The reason this (coincidently) works with Keil and not with GCC is differences in the memory allocations, which is entirely up to the compiler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>