<?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 to FW update via bootlaoder with nrf52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64925/how-to-fw-update-via-bootlaoder-with-nrf52832</link><description>Hello Nordic 
 I am using nrf52832, skd 16.0 , s132 v7, the data with the new FW will be delivered via UART 
 I wish to understand some issues regarding FW update, after doing some reading 
 first, if there is an example for a non secure FW update (we</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 22 Sep 2020 15:23:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64925/how-to-fw-update-via-bootlaoder-with-nrf52832" /><item><title>RE: how to FW update via bootlaoder with nrf52832</title><link>https://devzone.nordicsemi.com/thread/270910?ContentTypeID=1</link><pubDate>Tue, 22 Sep 2020 15:23:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f7407e5-4ebf-4afb-9228-8fbe6eb383f4</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am very sorry for the delay.&lt;/p&gt;
&lt;p&gt;Checksums are used in order to ensure that the firmware image is correct, before the new firmware is copied to the final destination or otherwise activated.&lt;/p&gt;
&lt;p&gt;If you use the Secure DFU bootloader, where firmware images must be signed, then you can also guarantee that any new firmware that gets accepted by the device must have been signed by you. (As long as you do not share the private key used for signing the updates with anyone.)&lt;/p&gt;
&lt;p&gt;The firmware itself can be read by anyone handling the zip file containing the upgrade, or intercepts the communication. The security is on validating the firmware, not on keeping the firmware secret.&lt;/p&gt;
[quote user="ziv123"]also, is security on the FW is an issue if the new FW file is passed via UART from a PC or some SOM that uses the nrfutil ?[/quote]
&lt;p&gt;I am not quite sure what you ask for here. Can you elaborate? And what do you mean by &amp;quot;SOM&amp;quot;?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to FW update via bootlaoder with nrf52832</title><link>https://devzone.nordicsemi.com/thread/268721?ContentTypeID=1</link><pubDate>Wed, 09 Sep 2020 11:15:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f600a953-76d7-4e97-96ac-1367b701aeaf</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Terje&lt;/p&gt;
&lt;p&gt;why does the sdk example have a FLASH_START = 0x64000 when bootloader acording to documentation starts at 0x78000 ???&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to FW update via bootlaoder with nrf52832</title><link>https://devzone.nordicsemi.com/thread/266816?ContentTypeID=1</link><pubDate>Thu, 27 Aug 2020 16:52:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f952c8b-9bc5-456d-8997-cb6d31260512</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Tesc&lt;/p&gt;
&lt;p&gt;one more issue regarding the bootloader, i wonder about security issues in the FW side, does the nrfutil app cover some security issues like some tokens or keys or something like that to prevent upgrading of bad FW ? if not, then how should i address this on the FW side ?&lt;/p&gt;
&lt;p&gt;also, is security on the FW is an issue if the new FW file is passed via UART from a PC or some SOM that uses the nrfutil ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to FW update via bootlaoder with nrf52832</title><link>https://devzone.nordicsemi.com/thread/265282?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2020 10:27:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:270d64d8-24d1-467d-885c-6bdcc75b5a8d</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Both pc-nrfutil and the DFU Target (as implemented by the bootloader examples) uses the same protocol. So no, there is no need to change the Target depending on what Controller you use (and vice versa), as long as they both use the same protocol.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to FW update via bootlaoder with nrf52832</title><link>https://devzone.nordicsemi.com/thread/265280?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2020 10:25:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4972d74a-e1f9-48ca-ace1-9bb3fe72c85e</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1. I recommend testing the BLE example first, as it covers all the steps. Please consult the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Fsdk_app_serial_dfu_bootloader.html&amp;amp;anchor=serial_sdk_app_dfu_bootloader_test"&gt;Testing&lt;/a&gt; section of the Secure DFU Bootloader over Serial Link (UART/USB) example documentation. micro-ecc is needed for the nrf_crypto library, which is required by the bootloader. (Signing will still be required for upgrading the bootloader itself, so hence the need for the cryptography library.)&lt;/p&gt;
&lt;p&gt;2. If you want to investigate how the bootloader works internally, you can start by looking at nrf_bootloader_init() called from main. After some initialization (depending on what triggers or enter methods are configured), you will find the checks for how the bootloader will proceed (either activating firmware from ongoing DFU, enter DFU mode, or start application.)&lt;/p&gt;
&lt;p&gt;3. For entering the bootloader from the app, through &amp;quot;buttonless DFU&amp;quot;, you must add to your app, yes. &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Fble_sdk_app_buttonless_dfu.html"&gt;The buttonless DFU template example&lt;/a&gt; shows this, although it uses BLE Services for triggering the DFU. The libraries used (for the BLE services and handling of the SoftDevice write to GPREGRET registers before resetting the device, which is the way the DFU bootloader is signalled to enter DFU mode.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to FW update via bootlaoder with nrf52832</title><link>https://devzone.nordicsemi.com/thread/265228?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2020 07:27:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b572a7fe-eba5-4930-9b0a-afcdaeb8b6b6</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Tesc&lt;/p&gt;
&lt;p&gt;as i mentioned there will be more questions for sure&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;1. so i looked at the &amp;#39; secure_bootloader_uart_mbr_pca10040&amp;#39; example in my sdk and it does not compile, the&amp;nbsp;&lt;/p&gt;
&lt;p&gt;(&amp;nbsp;#include &amp;quot;uECC.h&amp;quot; -&amp;gt; no such file or directory ) maybe you know why ??&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i set the&amp;nbsp;&lt;span&gt;NRF_DFU_REQUIRE_SIGNED_APP_UPDATE&amp;nbsp; to&amp;nbsp; &amp;#39;0&amp;#39;&amp;nbsp; so to my understanding there should not be a need for the ley generation and the extra libraries addition&amp;nbsp;??&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;2. another thing is that i try to look in the main.c to understand what is happening and all i see is switching leds and could not find a check for the DFU mode trigger in the code , can you please explain what i am missing ?&lt;/p&gt;
&lt;p&gt;3. also in my app code, do i need to add some bootload libraries to recognize the &amp;#39;&amp;nbsp;enter_buttonless_dfu and set it to true before restarting to get into FW update mode via mbr ? the macro &amp;#39;&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_BUTTONLESS &amp;#39; is not even found in my app code sdk_config.h file , do i add it alone or all the other definitions around it related to the booload ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to FW update via bootlaoder with nrf52832</title><link>https://devzone.nordicsemi.com/thread/265139?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 13:56:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a81d3292-97c9-4681-96c4-d7c5552c3a2c</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Tesc :)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks for the detailed reply, i have a lot more to be reading now :)&amp;nbsp; and probably will have more questions after reading and starting to code&lt;/p&gt;
&lt;p&gt;one questions though now, regarding the nrfutil,&amp;nbsp;&lt;/p&gt;
[quote userid="8164" url="~/f/nordic-q-a/64925/how-to-fw-update-via-bootlaoder-with-nrf52832/265089"]We have development tools for running DFU from PC. For instance you can do UART DFU from &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrfutil%2FUG%2Fnrfutil%2Fnrfutil_intro.html"&gt;nrfutil&lt;/a&gt;, for which you can find the source code on github: &lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil"&gt;https://github.com/NordicSemiconductor/pc-nrfutil&lt;/a&gt;[/quote]
&lt;p&gt;&lt;span&gt;if the DFU Controller side uses the nrfutil, does it change something in the implementation on the DFU Target side, or the target still needs to implement the same bootloader and flash it via Segger debugger and so on ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;basically i am writing the DFU Target side but still good to know if integrating the nrfutil in the DFU Controller side app saves some work for any of the sides ?&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to FW update via bootlaoder with nrf52832</title><link>https://devzone.nordicsemi.com/thread/265100?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 12:35:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b18ea8b4-99db-4723-a21e-d66d73dc5033</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;An additional note: For UART DFU on nRF52832, I recommend starting with examples/dfu/secure_bootloader/pca10040_uart or examples/dfu/secure_bootloader/pca10040_uart_debug, and modify it to use the open bootloader configurations and correct amount of DFU_APP_DATA_RESERVED for your application.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to FW update via bootlaoder with nrf52832</title><link>https://devzone.nordicsemi.com/thread/265089?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 12:23:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:212f5a67-3d13-4a2d-900a-d1b02deae036</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You are correct that all of the examples for the open_bootloader in the examples/dfu folder of the SDK is for the nRF52840, and not for the nRF52832 or any other devices in the nRF52 series. This is most likely because the nRF52840 Dongle (the PCA10059) does not have a programmer on-board, so USB DFU is needed.&lt;/p&gt;
&lt;p&gt;You will find examples for &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Fsdk_app_serial_dfu_bootloader.html"&gt;serial transport&lt;/a&gt; in the examples/dfu/secure_bootloader folder, as well as for BLE. The &amp;quot;secure&amp;quot; part of the name, reflects the ability of the bootloader to require signed upgrades. This is an optional feature, and the difference between the &amp;quot;secure&amp;quot; and &amp;quot;open&amp;quot; DFU bootloader examples lies in the configuration. You can disable (or enable) signing through the NRF_DFU_REQUIRE_SIGNED_APP_UPDATE define found in sdk_config.h. See &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Fble_sdk_app_open_bootloader.html"&gt;Open Bootloader with DFU&lt;/a&gt; for more info on the &amp;quot;open&amp;quot; configuration.&lt;/p&gt;
&lt;p&gt;I also recommend having a look at &lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/getting-started-with-nordics-secure-dfu-bootloader"&gt;Getting started with Nordic&amp;#39;s Secure DFU bootloader, a step by step guide&lt;/a&gt;, for getting familiar with how our DFU bootloaders work.&lt;/p&gt;
&lt;p&gt;1. For memory layout, see &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Flib_bootloader.html&amp;amp;anchor=lib_bootloader_memory"&gt;Memory layout&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;2. As long as the new application uses the same SoftDevice, you can update only the applicaton. Bootloader, SoftDevice and application are treated as individual components. The bootloader keeps track of SoftDevice requirements from bootloader and application, allowing only upgrades that leave the device with a combination SoftDevice/bootloader/application that is compatible.&lt;/p&gt;
&lt;p&gt;3. Execution starts in MBR (Master Boot Record), then goes to bootloader, which decides whether to enter DFU mode or to start the application. (It enters DFU mode if requested through one of the methods for entering DFU mode, or if no valid application is found.)&lt;/p&gt;
&lt;p&gt;4. You have &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Flib_bootloader.html&amp;amp;anchor=lib_bootloader_dfu_mode"&gt;several options&lt;/a&gt; for how to trigger DFU mode, including writing to the GPREGRET register (as showcased through the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Fble_sdk_app_buttonless_dfu.html"&gt;buttonless DFU example&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;5. This is handled by the bootloader code. There are two types of download, which you can read about here: &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Flib_bootloader_dfu_banks.html"&gt;Dual-bank and single-bank updates&lt;/a&gt;. Basically, with &amp;quot;dual-bank&amp;quot; the new image is first downloaded to emtpy flash, then checked, before upgrade is completed by copying to the final location. This final step is done by the MBR, which runs at boot and is very small, uncomplicated, well tested and robust. For the bootloader to stay away from application data, you configure how many pages of application data to preserve through the DFU_APP_DATA_RESERVED define (see bottom of same documentation page as for dual-bank and single-bank updates.)&lt;/p&gt;
&lt;p&gt;6. As mentioned in 5., &amp;quot;dual-bank&amp;quot; is one of the options and it does exactly what you suggest.&lt;/p&gt;
&lt;p&gt;7. Bootloader can be combined with watchdog, yes. I do not know the details for that, but there are other DevZone threads covering that. If you experience any difficulties with watchdog that are not yet handled here in DevZone, then please start a new thread for that.&lt;/p&gt;
&lt;p&gt;8. The bootloader projects are already configured to build for a particular region of flash. (Actually, the same goes for application, as it lies on top of the SoftDevice. In that regard it is very similar.) If you start off with a bootloader project from our SDK, for the device you are using, then this is already correctly configured.&lt;/p&gt;
&lt;p&gt;9. MBR is Master Boot Record. It is the first flash page of the SoftDevice, and it does not get updated through DFU. It is part of the SoftDevice delivery, but can also be used without SoftDevice for projects that do not use SoftDevice.&lt;/p&gt;
&lt;p&gt;10. We have development tools for running DFU from PC. For instance you can do UART DFU from &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrfutil%2FUG%2Fnrfutil%2Fnrfutil_intro.html"&gt;nrfutil&lt;/a&gt;, for which you can find the source code on github: &lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil"&gt;https://github.com/NordicSemiconductor/pc-nrfutil&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;11. While the bootloader is intended to be a standalone unit that requires booting into (without the main application of the device running), some customers have been looking into &amp;quot;background DFU&amp;quot;, that is downloading the new application from the current applicaiton, instead of booting into the bootloader first. The most straight-forward would be to use the bootloader as is (that is, run DFU from within the bootloader), but if you are interested in &amp;quot;background DFU&amp;quot; then I suggest that you do a search here on DevZone for that term.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>