<?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>Adjustment of Ram and Flash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50801/adjustment-of-ram-and-flash</link><description>Hey everyone, 
 
 i would like to use the NRF52811 with the new Softdevice S140 V 7.0. Therfore i took the ble_app_blinky (pca10056) example and changed some preprocessor defines. My problem is to adjust the RAM and Flash settings. I found a table with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Aug 2019 10:47:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50801/adjustment-of-ram-and-flash" /><item><title>RE: Adjustment of Ram and Flash</title><link>https://devzone.nordicsemi.com/thread/204707?ContentTypeID=1</link><pubDate>Mon, 19 Aug 2019 10:47:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47d209a9-e804-4734-aff1-6f0e49482e13</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I think it will be difficult to&amp;nbsp;reduce the code size of the relay example&amp;nbsp;enough to fit on the 52811. The example is approx. 55KB compiled with GCC and -Os while you only have&amp;nbsp; 0x30000 - 0x27000 (flash end - Softdevice start) = 36KB available. I would recommend you to consider s112/s113 or use nRF52840 with s140 if you need the extra features.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adjustment of Ram and Flash</title><link>https://devzone.nordicsemi.com/thread/203818?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 12:19:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aba0fe53-9e93-40c2-a145-ec118767259f</guid><dc:creator>Dominik</dc:creator><description>&lt;p&gt;mh im still not able to get LOG prints, anyway i figured out with your hint that i can debug the log prints directly. This is also described here in point 9:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/adjustment-of-ram-and-flash-memory"&gt;https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/adjustment-of-ram-and-flash-memory&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Overall my first Problem is solved (blinky example with S140 V7.0 works) but now i would like to use this to get the &amp;quot;relay&amp;quot; example working.&amp;nbsp;Unfortunately this example does not fit on the nrf52811 due to flash overflow.&lt;/p&gt;
&lt;p&gt;Is it possible to reduce the needed flash memory?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adjustment of Ram and Flash</title><link>https://devzone.nordicsemi.com/thread/203365?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2019 14:24:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d81cef89-6704-43e1-9add-a266cbdd8ca4</guid><dc:creator>BinderT</dc:creator><description>[quote userid="79681" url="~/f/nordic-q-a/50801/adjustment-of-ram-and-flash/203232"]should i see this in the console or debugger console?[/quote]
&lt;p&gt;i&amp;#39;m not familiar with using openocd. Using&amp;nbsp;JLink RTT Viewer.&lt;br /&gt;&lt;br /&gt;The debug also need to be enabled with this macro:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// &amp;lt;e&amp;gt; NRF_SDH_BLE_LOG_ENABLED - Enable logging in SoftDevice handler (BLE) module.
//==========================================================
#ifndef NRF_SDH_BLE_LOG_ENABLED
#define NRF_SDH_BLE_LOG_ENABLED 1
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Also have a look at:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;//==========================================================
// &amp;lt;e&amp;gt; NRF_LOG_BACKEND_RTT_ENABLED - nrf_log_backend_rtt - Log RTT backend
//==========================================================
#ifndef NRF_LOG_BACKEND_RTT_ENABLED
#define NRF_LOG_BACKEND_RTT_ENABLED 1
#endif


// &amp;lt;e&amp;gt; NRF_LOG_BACKEND_UART_ENABLED - nrf_log_backend_uart - Log UART backend
//==========================================================
#ifndef NRF_LOG_BACKEND_UART_ENABLED
#define NRF_LOG_BACKEND_UART_ENABLED 0
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;These are the lines you are looking for in nrf_sdh_ble.c :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;        NRF_LOG_WARNING(&amp;quot;Insufficient RAM allocated for the SoftDevice.&amp;quot;);

        NRF_LOG_WARNING(&amp;quot;Change the RAM start location from 0x%x to 0x%x.&amp;quot;,
                        app_ram_start_link, *p_app_ram_start);
        NRF_LOG_WARNING(&amp;quot;Maximum RAM size for application is 0x%x.&amp;quot;,
                        ram_end_address_get() - (*p_app_ram_start));&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There is a guide posted about adjusting the ram and rom settings on this site. Can&amp;#39;t seem to find it now.&lt;/p&gt;
[quote userid="79681" url="~/f/nordic-q-a/50801/adjustment-of-ram-and-flash/203232"]My idea was to just exchange the S140[/quote]
&lt;p&gt;Yes you can do this. I just don&amp;#39;t like doing this cause it creates a devops nightmare.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adjustment of Ram and Flash</title><link>https://devzone.nordicsemi.com/thread/203232?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2019 08:27:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a806cb8-5dfa-413a-b8fa-314cd4073ed9</guid><dc:creator>Dominik</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;you are right the NRF52811 is &amp;quot;normaly&amp;quot; used with the Softdevice S112. There was a S140 Update V 7.0.0 so it also can be used with the NRF52811. This is advertised on the Softdevice &amp;amp; NRF52811 webpage.&amp;nbsp;It is also true that the new S140 is not included in the current SDK15.3. My idea was to just exchange the S140 in the current SDK and then be able to use it (of course i dont have any specific examples then). Isnt this possible?&lt;/p&gt;
&lt;p&gt;Currently the blinky example crashes at this point:&amp;nbsp; err_code = nrf_sdh_ble_enable(&amp;amp;ram_start); (without the flag DDEBUG)&lt;/p&gt;
&lt;p&gt;so i guess something is wrong with my RAM adjustment. After i add the DDEBUG flag i dont get any ram information :/ (should i see this in the console or debugger console?)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;EDIT:&lt;/p&gt;
&lt;p&gt;I changed my RAM settings to&amp;nbsp;&lt;span&gt;RAM_START=0x20003000;RAM_SIZE=0x3000&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;like in this post:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/50723/how-to-use-softdevice-s140-v7-0-0"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/50723/how-to-use-softdevice-s140-v7-0-0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;with this adjustment the ble_blinky example works! I have no idea why but at least something =)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adjustment of Ram and Flash</title><link>https://devzone.nordicsemi.com/thread/203160?ContentTypeID=1</link><pubDate>Thu, 08 Aug 2019 19:10:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64bea72e-58b8-47a2-892f-e7c880d635ec</guid><dc:creator>BinderT</dc:creator><description>&lt;p&gt;Believe the&amp;nbsp;&lt;span&gt;NRF52811 is intended to be used with the S112&amp;nbsp;Softdevice (pca10056&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;e&lt;/strong&gt;&lt;/span&gt;). s140 is used for the NRF52840 (pca10056).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I am assuming you are using gcc compiler since you mention &lt;span&gt;eclipse and openocd&lt;/span&gt;.&lt;br /&gt;In the makefile.&lt;br /&gt;Under the comment:&lt;br /&gt;# C flags common to all targets&lt;br /&gt;&lt;br /&gt;Add this:&lt;br /&gt;CFLAGS += -DDEBUG&lt;br /&gt;&lt;br /&gt;This will print the ram values that are needed if it is set to too little (too much does not give an error). After a call to&amp;nbsp;sd_ble_enable().&lt;br /&gt;&lt;br /&gt;Flash is&amp;nbsp;&lt;span&gt;Origin&amp;nbsp;is set to Flash Start.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Don&amp;#39;t believe that S140 V7 is supported in the SDKs as of SDK15.3 unless there was a new release.&lt;br /&gt;&lt;br /&gt;Also do a clean build after adjusting linker values.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>