<?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>porting code for S110 to work with S310</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3512/porting-code-for-s110-to-work-with-s310</link><description>Hi, 
 When porting code for S110 to work with S310, what modifications are required? 
 Thanks.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Aug 2014 03:34:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3512/porting-code-for-s110-to-work-with-s310" /><item><title>RE: porting code for S110 to work with S310</title><link>https://devzone.nordicsemi.com/thread/12705?ContentTypeID=1</link><pubDate>Wed, 20 Aug 2014 03:34:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3790a4b-8f0d-4428-b43b-33ba0064a3b4</guid><dc:creator>Hailang</dc:creator><description>&lt;p&gt;Thank you, Stefan.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: porting code for S110 to work with S310</title><link>https://devzone.nordicsemi.com/thread/12704?ContentTypeID=1</link><pubDate>Tue, 19 Aug 2014 08:14:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb3b4add-fd64-487d-9d2d-86e01b9d1492</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;I mean the S310 v1.0.0 is based on S210 v3.0.0 and S110 v6.0.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: porting code for S110 to work with S310</title><link>https://devzone.nordicsemi.com/thread/12703?ContentTypeID=1</link><pubDate>Tue, 19 Aug 2014 08:13:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:280043e3-2824-4cdc-bfb3-aa5041104db3</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;One important thing i forgot to mention. The S310 stack is based on S210 v3.0.0 and S110 v6.0.0. So you  need to use ble_app_hrs example from SDK 5.2.0 since that SDK version is compatible with S110 v6.0.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: porting code for S110 to work with S310</title><link>https://devzone.nordicsemi.com/thread/12702?ContentTypeID=1</link><pubDate>Mon, 18 Aug 2014 15:50:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efcd5db1-3cb8-43f2-a183-137c092ee538</guid><dc:creator>Hailang</dc:creator><description>&lt;p&gt;Here is what I did.
The board I worked with was N5 Start Kit from Dynastream which had a nRF51422 inside.
At first, I took the example code &amp;quot;ble_app_hrs&amp;quot; from nrf51_sdk_v6_0_0_43681\nrf51822\Board\pca10001\s110\ble_app_hrs. I also installed N5StarterKitSDK_1.00 which provided board abstraction codes for N5 Start Kit. I modified the project and code so that it worked well with IAR Embedded Workbench, N5 Start Kit and S110 v7.0.0 - I could see the Heart Rate Measurement value in Master Control Panel and change its value by buttons.
Then, I supposed the code should worked well with S310 v1.0.0, I did the same modifications you showed above but in IAR EW.
At first I got building error.
&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/S310-compiling-error.PNG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;The cause was these codes:
// Enable BLE stack
ble_enable_params_t ble_enable_params;
memset(&amp;amp;ble_enable_params, 0, sizeof(ble_enable_params));
ble_enable_params.gatts_enable_params.service_changed = IS_SRVC_CHANGED_CHARACT_PRESENT;
err_code = sd_ble_enable(&amp;amp;ble_enable_params);
APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;Then I simply removed all these codes and built the code again. It worked.&lt;/p&gt;
&lt;p&gt;From this experience, it looks to me that porting code for S110 to work with S310 probably needs some code modification. I wonder if there is any other difference between S110 and S310 in the sense of application source code, maybe some differences which are not as explicit as this one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: porting code for S110 to work with S310</title><link>https://devzone.nordicsemi.com/thread/12701?ContentTypeID=1</link><pubDate>Mon, 18 Aug 2014 15:39:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a808108d-64a7-4940-8982-5f03e1f1d94f</guid><dc:creator>Hailang</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;/p&gt;
&lt;p&gt;Thanks for your quick reply.
I did the same modifications. But it needed more modification in my case.
Maybe it&amp;#39;s better to describe what I did in my case. I&amp;#39;ll write these in an answer instead of a comment here because of the word number limitation and incapability of pasting picture.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: porting code for S110 to work with S310</title><link>https://devzone.nordicsemi.com/thread/12700?ContentTypeID=1</link><pubDate>Mon, 18 Aug 2014 06:47:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e61baf94-9086-4ffd-b90a-763434884849</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Here is the porting guide, i.e. to port any S110 application to the S310 v1.0.0 softdevice. First copy the BLE example folder to directory \Nordic\nrf51_sdk_v5_2_0_39364\nrf51422\Board\nrf6310\s310. There are actually only two changes to the BLE project needed in order to make it compatible with the S310 softdevice:&lt;/p&gt;
&lt;p&gt;a) In Keil -&amp;gt; Options for Target, change the path from /include/S110 to /include/S310
&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4064.Capture-_2D00_-S310-porting-_2D00_-change-path-to-S310-folder.JPG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;b) Change RAM and ROM settings
&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5344.Capture-_2D00_-RAM-and-ROM-settings-for-S310-softdevice.JPG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;Note: The S310 v1.0.0 softdevice is based on S110 v6.0.0 and S210 v3.0.0 softdevices. For that reason, only port BLE examples from nRF51 SDK v5.2.0 to work with the S310 v1.0.0 softdevice, because the nRF51 SDK v5.2.0 is compatible with S110 v6.0.0.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 8.12.2014 for S310 v2.0.0&lt;/strong&gt;
The procedure for port BLE application from SDK 7.1.0 to the S310 v2.0.0 is similar as for the S310 v1.0.0.&lt;/p&gt;
&lt;p&gt;a) In Keil -&amp;gt; Options for Target, change the path from /include/S110/headers to /include/S310/headers
&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Capture-_2D00_-S310-porting-_2D00_-change-path-to-S310-2_5F00_0_5F00_0-folder.JPG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;b) Change RAM and ROM settings
&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Capture-_2D00_-ROM-and-RAM-settings-S310-v2_5F00_0_5F00_0.JPG" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>