<?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>How can we use nrf51822 BLE services with RIOT OS without accessing to the lower layers ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/5334/how-can-we-use-nrf51822-ble-services-with-riot-os-without-accessing-to-the-lower-layers</link><description>Hello, 
 We are French students in a school of engineers. We are developing a project based on the nrf51822. 
 Actually, we implemented RIOT OS on this SoC and we would like to use nrf51822 BLE features. Nordic Semiconductors provides SoftDevices (s110</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 29 May 2015 06:16:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/5334/how-can-we-use-nrf51822-ble-services-with-riot-os-without-accessing-to-the-lower-layers" /><item><title>RE: How can we use nrf51822 BLE services with RIOT OS without accessing to the lower layers ?</title><link>https://devzone.nordicsemi.com/thread/18632?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 06:16:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efe9b097-20fd-4a2f-90d4-8ea04abaf5db</guid><dc:creator>tnesheim</dc:creator><description>&lt;p&gt;Can you go into more detail as to how you got this to work? I have done exactly as you did above and am using the command &amp;quot;BOARD=pca10005 make -B clean flash&amp;quot; but am getting the following error:
***** Error: Programming failed @ address 0x00000000 (block verification error)
Error while programming flash: Programming failed.&lt;/p&gt;
&lt;p&gt;It seems that it is still trying to program flash at 0x0 even though I changed the linker script file.
Any thoughts or suggestions?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can we use nrf51822 BLE services with RIOT OS without accessing to the lower layers ?</title><link>https://devzone.nordicsemi.com/thread/18631?ContentTypeID=1</link><pubDate>Wed, 04 Feb 2015 15:55:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d87ea84-553a-4385-819e-28538e612e60</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;There is no existing libraries in RIOT OS for handling the s110 BLE stack. Maybe you could try to use the libraries in the nRF SDK. I successfully managed to compile RIOT OS while including the &lt;strong&gt;softdevice_hander.h&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;You need to add the INCLUDES and some CFLAGS to the Makefile:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;INCLUDES += -I../../sdk7.2/components/toolchain/gcc
INCLUDES += -I../../sdk7.2/components/toolchain
INCLUDES += -I../../sdk7.2/components/libraries/button
INCLUDES += -I../../sdk7.2/components/libraries/sensorsim
INCLUDES += -I../../sdk7.2/components/ble/ble_services/ble_hrs
INCLUDES += -I../../sdk7.2/components/ble/ble_services/ble_dis
INCLUDES += -I../../sdk7.2/components/ble/ble_services/ble_bas
INCLUDES += -I../../sdk7.2/components/softdevice/s110/headers
INCLUDES += -I../../sdk7.2/components/ble/common
INCLUDES += -I../../sdk7.2/components/libraries/timer
INCLUDES += -I../../sdk7.2/components/libraries/gpiote
INCLUDES += -I../../sdk7.2/components/drivers_nrf/hal
INCLUDES += -I../../sdk7.2/components/ble/device_manager
INCLUDES += -I../../sdk7.2/components/ble/device_manager/config
INCLUDES += -I../../sdk7.2/components/softdevice/common/softdevice_handler
INCLUDES += -I../../sdk7.2/components/libraries/scheduler
INCLUDES += -I../../sdk7.2/components/drivers_nrf/pstorage
INCLUDES += -I../../sdk7.2/components/drivers_nrf/pstorage/config
INCLUDES += -I../../sdk7.2/components/libraries/util
INCLUDES += -I../../sdk7.2/components/libraries/trace
INCLUDES += -I../../sdk7.2/components/drivers_nrf/uart
INCLUDES += -I../../sdk7.2/components/libraries/fifo
INCLUDES += -I../../sdk7.2/examples/bsp

CFLAGS += -DNRF51
CFLAGS += -DBLE_STACK_SUPPORT_REQD
CFLAGS += -DS110
CFLAGS += -DSOFTDEVICE_PRESENT
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the &lt;strong&gt;RIOT/cpu/nrf51822/nrf51822qfaa_linkerscript.ld&lt;/strong&gt; linker script, you need to change the start address of the ROM and RAM:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;rom (rx)    : ORIGIN = 0x00016000, LENGTH = 256K
ram (rwx)   : ORIGIN = 0x20002000, LENGTH = 16K
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Also, the softdevice must be flashed on to the chip.&lt;/p&gt;
&lt;p&gt;By compiling the following &lt;strong&gt;main.c&lt;/strong&gt; code, I was able to get a response from the SoftDevice and print the value over UART.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;quot;softdevice_handler.h&amp;quot;

int main(void)
{
    puts(&amp;quot;Hello World!&amp;quot;);
    uint8_t a;
    uint16_t b;
    char ret = sd_ble_evt_get(&amp;amp;a,&amp;amp;b);
    printf(&amp;quot;output %i\n&amp;quot;,ret);
    return 0;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If it is possible to use the whole BLE stack I don&amp;#39;t know, I guess you just have to try.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>