<?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>DFU for different Chips - Guidelines request</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17458/dfu-for-different-chips---guidelines-request</link><description>Hello, 
 the past week I am trying to make the bootloader_secure example work for a custom hardware with no luck. This whole procedure give birth however to several questions. 
 (Should not matter, but I am using a nrf51 chip with 16KB RAM and 256KB</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 10 Nov 2016 12:42:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17458/dfu-for-different-chips---guidelines-request" /><item><title>RE: DFU for different Chips - Guidelines request</title><link>https://devzone.nordicsemi.com/thread/67095?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2016 12:42:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9dfe401e-6f08-4147-a472-c22894cdd4cc</guid><dc:creator>Tanasis!</dc:creator><description>&lt;p&gt;Hello Hung,
Thanks for clearing this! (Regarding the RAM, I don&amp;#39;t have insights on the implementation, so there might be a case - for example - where you needed to allocate buffer(s) to store debug info, so stack becomes larger. I am not saying it should, I was wondering if it is happening...)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for different Chips - Guidelines request</title><link>https://devzone.nordicsemi.com/thread/67094?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2016 12:35:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0c54750-bc98-487c-a6ba-3460a75c8cb6</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Tanasis,&lt;/p&gt;
&lt;p&gt;1 . It came a little bit from the legacy S130v1.0 that we need 11kB of RAM for the softdevice and the attribute table. If you are using the S130 v2.0 and don&amp;#39;t add any more service or characteristic, you can use 0x200025E0 as the RAM start address (you can find the actual RAM required from the softdevice by adding a break point after you called sd_ble_enable() and check the app_ram_base return value.  As I mentioned, the debug project is only  for using with debug key, it has nothing to do with RAM and ROM configuration, nor with code optimization.&lt;/p&gt;
&lt;p&gt;Why should RAM setting be different when using debug ?&lt;/p&gt;
&lt;p&gt;3 . No, we only make generic DFU example. Specific implementation should be done by the user.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for different Chips - Guidelines request</title><link>https://devzone.nordicsemi.com/thread/67093?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2016 10:41:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b45fce5-a659-42c2-b4c0-79eb643d6102</guid><dc:creator>Tanasis!</dc:creator><description>&lt;p&gt;@Hung&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I am not gonna do this of course. :) I am trying to understand the logic.&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;How about the RAM? How is 0x20002C00 for nrf51 / S130 computed? And why are RAM requirements NOT different when using debug?&lt;/li&gt;
&lt;/ul&gt;
&lt;ol start="2"&gt;
&lt;li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Buttons. Yes I agree - this is obvious. But I was hopping that there was a more elegant solution. Perhaps detect long press of the Button after startup and enter Bootloader. Or maybe detect a looooong press (5 secs or so) during normal operation and then reset chip and force it to the Bootloader, etc.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;THanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for different Chips - Guidelines request</title><link>https://devzone.nordicsemi.com/thread/67091?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2016 15:08:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afb395de-5210-4fee-aead-ff6be4ba21dc</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Sorry about that :(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for different Chips - Guidelines request</title><link>https://devzone.nordicsemi.com/thread/67090?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2016 15:00:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:041d94a0-53cf-468f-ab07-b42152c34414</guid><dc:creator>Kyle Krueger</dc:creator><description>&lt;p&gt;Gave our hardware guys a bit of a scare with that one, thanks for the update.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for different Chips - Guidelines request</title><link>https://devzone.nordicsemi.com/thread/67089?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2016 14:45:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb4d6a57-2662-4fb6-b8d6-789666cbc4b4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Kyle,
Sorry, my mistake :(  Yes it&amp;#39;s 32MHz crystal which runs the 64MHz oscillator. I updated the answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for different Chips - Guidelines request</title><link>https://devzone.nordicsemi.com/thread/67088?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2016 13:39:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d5524fd-f310-448c-8ecd-469f8c24a051</guid><dc:creator>Kyle Krueger</dc:creator><description>&lt;p&gt;Hung Bui, is it a mistake that you have written 64 MHz instead of 32 MHz as the only option for the nRF52?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for different Chips - Guidelines request</title><link>https://devzone.nordicsemi.com/thread/67092?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2016 08:49:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c4a4486-1b9e-4105-b605-4eddea450f16</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Tanasis:&lt;/p&gt;
&lt;p&gt;1 . I don&amp;#39;t understand why you want to locate the bootloader in different address ? You should always locate it at the top end of the flash. This way gives you the maximum free space to receive the new image of the application and/or softdevice.&lt;/p&gt;
&lt;p&gt;Note that the debug project is only about using the debug keys for secure DFU. It&amp;#39;s not about the optimization level and related. The size of the bootloader remains the same. And you still can&amp;#39;t set break point and step in the code. If you want to debug and step in the code, you would need to change the optimization level, and therefore change the start address of the bootloader as the size of it grows bigger.&lt;/p&gt;
&lt;p&gt;3 . What  &amp;quot;1&amp;quot; ? You mean one button ? You can do whatever you want with the button, just remove the code in the bootloader to enter bootloader mode when the button is pressed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for different Chips - Guidelines request</title><link>https://devzone.nordicsemi.com/thread/67087?ContentTypeID=1</link><pubDate>Fri, 04 Nov 2016 18:00:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03b4155b-e008-4199-bb89-213bca8a4703</guid><dc:creator>Tanasis!</dc:creator><description>&lt;p&gt;Hello Hung. Thx for the reply. Some follow-up questions please:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Actually the following needs to be satisfied: bootloader address &amp;gt; Softdevice (mbr is inside) + App size
Correct? (Of course if there are application data this is adjusted.) And of course bootloader + settings address &amp;lt; flash size. In simpler words, we can place the bootloader where-ever there is space left and update the UICR reg accordingly?&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;How about the RAM? How is 0x20002C00 for nrf51 / S130 computed? And why are RAM requirements NOT different when using debug?&lt;/li&gt;
&lt;li&gt;&amp;quot;Note that we haven&amp;#39;t tested the secure bootloader on other softdevices other than S130 v2.0 and S132 v3.0.&amp;quot; &amp;lt;--- &lt;strong&gt;Very important remark thank you!&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ol start="2"&gt;
&lt;li&gt;OK that&amp;#39;s clear :)&lt;/li&gt;
&lt;li&gt;For zero buttons this is clear. For 1? Anything to be done here? And I am guessing we can assign the BSP_BUTTON_4 to something random that is not used of course?&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for different Chips - Guidelines request</title><link>https://devzone.nordicsemi.com/thread/67086?ContentTypeID=1</link><pubDate>Wed, 02 Nov 2016 10:11:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bee4a6e4-9409-4a71-b567-cfd19414b059</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Tanasis,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The bootloader located on top of the flash, separated it from the application and the softdevice flash area. You might already find it in the &amp;quot;Memory Layout&amp;quot; section in the documentation. It doesn&amp;#39;t matter which softdevice you use, because we simply locate the bootloader at the top of the flash. The only thing matter is the size of the bootloader and the size of the flash.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Basically we need 2 pages, 8kB (on nRf52 and on nRF51 we need one page, 1kB) to store bootloader and MBR setting and then 24kB (0x6000) for the bootloader it self (on nRF51 it&amp;#39;s 20kB).&lt;/p&gt;
&lt;p&gt;You can then use the size of the flash, minus (bootloader size + setting size) to get the start address of the bootloader.&lt;/p&gt;
&lt;p&gt;RAM&amp;#39;s configuration shouldn&amp;#39;t be changed.
Note that we haven&amp;#39;t tested the secure bootloader on other softdevices other than S130 v2.0 and S132 v3.0.&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li&gt;
&lt;p&gt;It should be the same as a normal application. nRF52 only works with 32MHz crystal and nRF51 works with 16MHz and 32Mhz (XTALFREQ configuration needed)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For buttonless DFU, have a look at &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/ble_sdk_app_buttonless_dfu.html?cp=4_0_0_4_3_2"&gt;experimental_ble_app_buttonless_dfu example&lt;/a&gt; in ble_peripheral.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU for different Chips - Guidelines request</title><link>https://devzone.nordicsemi.com/thread/67085?ContentTypeID=1</link><pubDate>Wed, 02 Nov 2016 00:06:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d2d0761-8ccb-4a27-880e-d61d087b07dc</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;Just to add a &amp;quot;me to&amp;quot; to this&lt;/p&gt;
&lt;p&gt;I need to create a secure bootloader for a new product, using the nRF51822QFAA (256k flash 16k RAM)&lt;/p&gt;
&lt;p&gt;I do not have a button on the board either (well not one that is user accessible).&lt;/p&gt;
&lt;p&gt;I was hoping that the bootloader could be called from the application code, but I am not at the point in our development where I have time to investigate how that could be done.&lt;/p&gt;
&lt;p&gt;I have looked at the example code, and as far as I can tell, the bootloader would run straight after power on, which is not much use to us, as the device will be powered permanently by a battery which is not user accessible.&lt;/p&gt;
&lt;p&gt;So I&amp;#39;d be interested to learn how to do this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>