<?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>Eclipse GCC: Unable to run two custom services (experimental buttonless DFU and experimental app ble blinky) on SDK 12</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17858/eclipse-gcc-unable-to-run-two-custom-services-experimental-buttonless-dfu-and-experimental-app-ble-blinky-on-sdk-12</link><description>We are able to run both these services (experimental buttonless DFU and experimental app ble blinky) individually in Eclipse GCC, SDK 12. However, when both of the services are combined, nrf is stuck at softdevice_enable(&amp;amp;ble_enable_params) function.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 29 Nov 2016 06:38:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17858/eclipse-gcc-unable-to-run-two-custom-services-experimental-buttonless-dfu-and-experimental-app-ble-blinky-on-sdk-12" /><item><title>RE: Eclipse GCC: Unable to run two custom services (experimental buttonless DFU and experimental app ble blinky) on SDK 12</title><link>https://devzone.nordicsemi.com/thread/68840?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2016 06:38:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b6f6449-f647-4de4-86d1-68b3838d56c1</guid><dc:creator>raju</dc:creator><description>&lt;p&gt;Thank you RK and Bjorn,&lt;/p&gt;
&lt;p&gt;Its working now, I changed RAM origin and length accrodingly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse GCC: Unable to run two custom services (experimental buttonless DFU and experimental app ble blinky) on SDK 12</title><link>https://devzone.nordicsemi.com/thread/68839?ContentTypeID=1</link><pubDate>Tue, 22 Nov 2016 08:50:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a1a43b9-e5b6-4185-b5ea-9ff1db5cc774</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;From the S132 API documentation of &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v3.0.0/group___b_l_e___c_o_m_m_o_n___f_u_n_c_t_i_o_n_s.html#ga812ea2c6258c1cf705c7c114b6297aab"&gt;sd_ble_enable&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;NRF_ERROR_NO_MEM	: The amount of memory assigned to the SoftDevice by *p_app_ram_base is not large enough to fit this configuration&amp;#39;s memory requirement. Check *p_app_ram_base and set the start address of the application RAM region accordingly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse GCC: Unable to run two custom services (experimental buttonless DFU and experimental app ble blinky) on SDK 12</title><link>https://devzone.nordicsemi.com/thread/68838?ContentTypeID=1</link><pubDate>Tue, 22 Nov 2016 02:34:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6e06b76-6eb3-41cc-9a78-9ea1428ef480</guid><dc:creator>raju</dc:creator><description>&lt;p&gt;Sorry, it is NRF_ERROR_NO_MEM , err_code = 4&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse GCC: Unable to run two custom services (experimental buttonless DFU and experimental app ble blinky) on SDK 12</title><link>https://devzone.nordicsemi.com/thread/68837?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2016 21:20:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31b6b601-cb52-4c8d-897e-6273b4786576</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;sd_ble_enable() doesn&amp;#39;t return the error code &amp;#39;5&amp;#39;. Have another look.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse GCC: Unable to run two custom services (experimental buttonless DFU and experimental app ble blinky) on SDK 12</title><link>https://devzone.nordicsemi.com/thread/68832?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2016 15:11:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b64f960-e2d5-489a-bf8a-70a7942867f5</guid><dc:creator>raju</dc:creator><description>&lt;p&gt;Here is my linker script, please suggest me, if anything I needed to edit in this&lt;/p&gt;
&lt;p&gt;/* Linker script to configure memory regions. */&lt;/p&gt;
&lt;p&gt;SEARCH_DIR(.)
GROUP(-lgcc -lc -lnosys)&lt;/p&gt;
&lt;p&gt;MEMORY
{
FLASH (rx) : ORIGIN = 0x1b000, LENGTH = 0x25000
RAM (rwx) :  ORIGIN = 0x20001fe8, LENGTH = 0x6018
/** Location of bootloader setting in flash. */
BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0003FC00, LENGTH = 0x1000&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;SECTIONS
{
/* Place the bootloader settings page in flash. */
.bootloaderSettings(NOLOAD) :
{&lt;/p&gt;
&lt;p&gt;} &amp;gt; BOOTLOADER_SETTINGS&lt;/p&gt;
&lt;p&gt;.fs_data :
{
PROVIDE(__start_fs_data = .);
KEEP(*(.fs_data))
PROVIDE(__stop_fs_data = .);
} &amp;gt; RAM
} INSERT AFTER .data;&lt;/p&gt;
&lt;p&gt;INCLUDE &amp;quot;nrf5x_common.ld&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse GCC: Unable to run two custom services (experimental buttonless DFU and experimental app ble blinky) on SDK 12</title><link>https://devzone.nordicsemi.com/thread/68831?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2016 15:06:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:feb63745-0d5d-4ab1-bf86-ea43f9f0444a</guid><dc:creator>raju</dc:creator><description>&lt;p&gt;err_code = 5 from the function &amp;#39;softdevice_enable(&amp;amp;ble_enable_params);&amp;#39; and its same err_code from function sd_ble_enable(p_ble_enable_params, &amp;amp;app_ram_base) in softdevice_handler.c.&lt;/p&gt;
&lt;p&gt;At the end it resets the nrf from function NVIC_SystemReset(); in  __WEAK void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info) in app_error_weak.c.&lt;/p&gt;
&lt;p&gt;I think its related to RAM , here is my linker script&lt;/p&gt;
&lt;p&gt;/* Linker script to configure memory regions. */&lt;/p&gt;
&lt;p&gt;SEARCH_DIR(.)
GROUP(-lgcc -lc -lnosys)&lt;/p&gt;
&lt;p&gt;MEMORY
{
FLASH (rx) : ORIGIN = 0x1b000, LENGTH = 0x25000
/&lt;em&gt;RAM (rwx) :  ORIGIN = 0x20001fe8, LENGTH = 0x6018&lt;/em&gt;/
RAM (rwx) :  ORIGIN = 0x20001fe8, LENGTH = 0x6018
/** Location of bootloader setting in flash. */
BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0003FC00, LENGTH = 0x1000&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;SECTIONS
{
/* Place the bootloader settings page in flash. */
.bootloaderSettings(NOLOAD) :
{&lt;/p&gt;
&lt;p&gt;} &amp;gt; BOOTLOADER_SETTINGS&lt;/p&gt;
&lt;p&gt;.fs_data :
{
PROVIDE(__start_fs_data = .);
KEEP(*(.fs_data))
PROVIDE(__stop_fs_data = .);
} &amp;gt; RAM
} INSERT AFTER .data;&lt;/p&gt;
&lt;p&gt;INCLUDE &amp;quot;nrf5x_common.ld&amp;quot;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse GCC: Unable to run two custom services (experimental buttonless DFU and experimental app ble blinky) on SDK 12</title><link>https://devzone.nordicsemi.com/thread/68836?ContentTypeID=1</link><pubDate>Sun, 20 Nov 2016 14:30:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bb1c639-e917-4d65-8fcc-8b24c19a852c</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;stop it with a debugger, look at the error code before APP_ERROR_CHECK() checks it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse GCC: Unable to run two custom services (experimental buttonless DFU and experimental app ble blinky) on SDK 12</title><link>https://devzone.nordicsemi.com/thread/68835?ContentTypeID=1</link><pubDate>Sun, 20 Nov 2016 13:47:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b26ea1e8-d2e6-45d6-8a11-955b517f405a</guid><dc:creator>raju</dc:creator><description>&lt;p&gt;Thanks for your response.
Could you suggest how to read error code? However, the effect of the error is that nrf restarts constantly, after the command APP_ERROR_CHECK(err_code).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse GCC: Unable to run two custom services (experimental buttonless DFU and experimental app ble blinky) on SDK 12</title><link>https://devzone.nordicsemi.com/thread/68834?ContentTypeID=1</link><pubDate>Sun, 20 Nov 2016 11:52:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfe7abd0-3bd6-45a8-8f25-6ef3358ddba9</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;well look up the error code and find out what it&amp;#39;s telling you the error is, then fix the error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Eclipse GCC: Unable to run two custom services (experimental buttonless DFU and experimental app ble blinky) on SDK 12</title><link>https://devzone.nordicsemi.com/thread/68833?ContentTypeID=1</link><pubDate>Sun, 20 Nov 2016 10:24:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9efb1849-fb17-40b7-b325-a31e0ed0253b</guid><dc:creator>raju</dc:creator><description>&lt;p&gt;We found that the exact error is at:&lt;/p&gt;
&lt;p&gt;err_code = sd_ble_enable(p_ble_enable_params, &amp;amp;app_ram_base);&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if (app_ram_base != ram_start)
{
    NRF_LOG_WARNING(&amp;quot;sd_ble_enable: app_ram_base should be adjusted to 0x%x\r\n&amp;quot;,
            app_ram_base);
    NRF_LOG_WARNING(&amp;quot;ram size should be adjusted to 0x%x \r\n&amp;quot;,
            ram_end_address_get() - app_ram_base);

}
else if (err_code != NRF_SUCCESS)
{
    NRF_LOG_ERROR(&amp;quot;sd_ble_enable: error 0x%x\r\n&amp;quot;, err_code);
}

return err_code;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Thus, in main.c, APP_ERROR_CHECK(err_code) is causing the nrf to restart. How do we resolve this?
Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>