<?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>Flash examples with and without bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20154/flash-examples-with-and-without-bootloader</link><description>Hello, 
 I tried to flash an application to the nRF52832. First I flashed the softdevice, after that I flashed the bootloader and next the application. 
 The application is not running and I read here that I ahve to merge the hex files so that the bootloader</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Mar 2017 09:11:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20154/flash-examples-with-and-without-bootloader" /><item><title>RE: Flash examples with and without bootloader</title><link>https://devzone.nordicsemi.com/thread/78487?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 09:11:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17c5fd44-ec1a-4237-aa5f-e3aab575f610</guid><dc:creator>Olovskos</dc:creator><description>&lt;p&gt;I`ve editted my question, The Problem is, that I have the nRF connected to a SoC running Embedded Linux. The only connection I have to the SoC is UART (No hardware reset). The Bootloader on the nRF is only running for 2 seconds (or 3 min in the newer bootloader config but this is so much too long) but the Kernel needs some time to boot. So I thought of implementing a command in my application on the nRF that is received via UART and if the app receives this command it jumps to the bootloader and again waits 2 seconds for the new image.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash examples with and without bootloader</title><link>https://devzone.nordicsemi.com/thread/78486?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 07:43:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad07abcc-c61c-4898-9af8-0a35f0454d96</guid><dc:creator>shibshab</dc:creator><description>&lt;p&gt;See my inline answers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash examples with and without bootloader</title><link>https://devzone.nordicsemi.com/thread/78485?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2017 07:29:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:039a86fa-bb13-4f79-85c1-dc774e8ee782</guid><dc:creator>Olovskos</dc:creator><description>&lt;p&gt;Thank you for this answer, could you also answer the other questions?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Is it possible to jump to the bootloader from a running application?&lt;/li&gt;
&lt;li&gt;How would I flash via BLE because it takes some time to connect to the device before flashing or not? Wouldn`t the bootloader exit its state and run the application before the connection is established and the firmware is sent&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: Flash examples with and without bootloader</title><link>https://devzone.nordicsemi.com/thread/78484?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2017 12:45:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0df06021-09aa-4c9f-b23d-b40f6cae262d</guid><dc:creator>shibshab</dc:creator><description>&lt;p&gt;Assuming that you are using one of the latest version of the secure bootloader the following applies:&lt;/p&gt;
&lt;p&gt;When using the bootloader you need to flash what is called &amp;#39;bootloader settings&amp;#39; to a specific address in memory. This is required so that the bootloader can validate the integrity of the application hex file.&lt;/p&gt;
&lt;p&gt;You can use nrfutil to generate this bootloader settings page for any given application hex file.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil"&gt;github.com/.../pc-nrfutil&lt;/a&gt; (&lt;code&gt;pip install nrfutil&lt;/code&gt;)&lt;/p&gt;
&lt;p&gt;The command would be something like&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrfutil settings generate --family NRF52 --application &amp;quot;path/to/my/app.hex&amp;quot; --application-version 1 --bootloader-version 1 --bl-settings-version 1 bootloader_settings.hex
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This would generate a hex file which you need to flash alongside the bootloader, application and softdevice in order for your application to be started by the bootloader.&lt;/p&gt;
&lt;p&gt;EDIT Inline answers:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If I would use the bootloader to flash
an app, would the bootloader notice
that this app is valid or do I have to
flash everything together again?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The bootloader verifies the correctness of the application by running a checksum on the received data and comparing it to the checksum contained in the DFU command received from the host.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Also, is it possible to jump out of
the app to the bootloader? So that I
could flah a new Image at any time
without reseting the nRF?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I don&amp;#39;t understand what you are asking. You can jump from the application to the bootloader at any point, however this usually requires some form of reset (softreset). It would help if you described the use-case.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;How would I flash via BLE because it
takes some time to connect to the
device before flashing or not?
Wouldn`t the bootloader exit its state
and run the application before the
connection is established and the
firmware is sent&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Once you have jumped to the bootloader using the &amp;quot;buttonless bootloader&amp;quot; functionality it will stay in &amp;quot;DFU mode&amp;quot; until an image has been received, or the device has been restarted.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>