<?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 separate files. inside</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29151/dfu-separate-files-inside</link><description>nRF52, S132, SDK13. 
 I need flash two .hex files. One- firmware, second- data. It flashed on a factory. data- veans serial number and other personal chips info. Now I can separate those files and merged first like discribed:
 devzone.nordicsemi.com</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 Jan 2018 12:51:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29151/dfu-separate-files-inside" /><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115852?ContentTypeID=1</link><pubDate>Wed, 17 Jan 2018 12:51:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed6a810d-2bf5-436c-8620-46d5a0ea715e</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Thanks for help a lot!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115851?ContentTypeID=1</link><pubDate>Wed, 17 Jan 2018 12:49:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53534ca4-2cd8-4d9e-9bd4-8dfa93677ee2</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mikhail,&lt;/p&gt;
&lt;p&gt;You are right, it was 0x73000 for _debug version and 0x78000 for normal version. Sorry that I didn&amp;#39;t asked which version you used.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115850?ContentTypeID=1</link><pubDate>Wed, 17 Jan 2018 12:21:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d2fcc1b-ef4a-4546-be55-dfff386e05d5</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;No, I said that bootloader in the SDK13 already has 0x7300
&lt;a href="http://prntscr.com/i1no2n"&gt;proof&lt;/a&gt;
and we located our data incorrect into 0x77800.
But with located 0x72400- all works correct.
I suppose, 0x7800 -just mistake in the documentation- from previous SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115849?ContentTypeID=1</link><pubDate>Wed, 17 Jan 2018 12:16:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30e3d44c-dd28-430d-9c9e-30297d1e4a86</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;You are saying you changed the bootloader start address to 0x73000 ? And after you moved your data to 0x72400 it worked fine?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115848?ContentTypeID=1</link><pubDate>Wed, 17 Jan 2018 08:24:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6248930-699d-4a47-a429-bae0da6cd349</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Hi! I decided problem- should locate my data from 0x72400 because bootloader starts not from 0x7800 and from 0x73000 !!!
I don&amp;#39;t know exactly why we try to write data like bootloader starts  0x77000???&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115839?ContentTypeID=1</link><pubDate>Fri, 22 Dec 2017 15:57:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f66fe18-f362-4259-a449-1f244019518a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Looks like it&amp;#39;s resetting all the time. You may want to follow &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/#60126"&gt;this guide&lt;/a&gt; to debug your application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115847?ContentTypeID=1</link><pubDate>Fri, 22 Dec 2017 15:33:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e757e70-adda-411f-8e0b-9a4106491001</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;if struct located in the first start address (0x1F800)- all works correct. Also merged bootloader is job. I can make DFU and new image (.zip) works good. But we now talk that I just flash this merged file via j-link. And in the case of struct located by 0x77000 addr- always reboot.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Yes. I use RTT debug and right after main() and LOG init&lt;/p&gt;
&lt;p&gt;NRF_LOG_INFO(&amp;quot;nInside main\r\n&amp;quot;);&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And after flash I see this string again and again
&lt;a href="http://prntscr.com/hr1p1z"&gt;proof&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;third question- I don&amp;#39;t know how to catch it.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115846?ContentTypeID=1</link><pubDate>Fri, 22 Dec 2017 15:11:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cae0c3ca-b6ea-4983-a611-cc7f36dd7cd1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mikhail,&lt;/p&gt;
&lt;p&gt;You need to find a way to debug. There are something you need to check:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;If the bootloader does it job, copy the image correctly ?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the bootloader manage to start the application ( the PC move to application , and run into main() )&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the application started, what causes it to reset ?&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115838?ContentTypeID=1</link><pubDate>Fri, 22 Dec 2017 07:49:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36707404-5fa0-4f42-9355-7ed109cd70e4</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;HI!&lt;/p&gt;
&lt;p&gt;with struct 0x77000 same result- always restart system. As you remember, only with bootloader merged.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115843?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 16:59:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e584b438-4cfc-4808-910f-d61933ed4e32</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Could you try 0x77000 ? 0x77800 is not page aligned (4KB) you could have overwriten the bootloader.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115842?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 16:23:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4dd4ae73-2817-489b-ad15-e398a5f1aaa0</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;I see when merge app with bootloader that app always restarting again and again.
It happen with struct located to 0x77800
If it located to 0x37800- all ok.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115841?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 16:02:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d326040e-ba20-478d-ac9c-52690dcd0b0c</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;ok, now works. I made changes in the sdk_config.h. I transfer this file settings from work project where it works.
Now I build bootloader again and will givw you more info&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115840?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 15:35:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a4866be-c976-45a5-abcf-70203d04f68f</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;&lt;a href="http://prntscr.com/hql4et"&gt;my settings&lt;/a&gt;
does any incorrect?
LOG_ENABLED, files.c are included...
?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115837?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 15:27:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be6487a5-880e-49a4-acd1-5a47a8b7d6ea</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;You need to enable LOG in sdk_config.h file, if you use Keil you can open the file in Configuration Wizard tab. NRF_LOG_ENABLED need to be enabled, and the Back end serial use RTT should be selected.
nrf_log library files should be included.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115836?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 14:43:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07727734-9fec-45f3-8aa6-8e71b6fed571</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;I have some problems with RTT debug. Let&amp;#39;s do it first. I able to run &lt;code&gt;...\examples\dfu\bootloader_secure_ble\pca10040_debug\&lt;/code&gt;
and receive dubug info. All correct. But In my project, based on an one of examples, there is no same debug info. I can&amp;#39;t receive it. As I see, I included RTT .c files, I added&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32_t err_code = NRF_LOG_INIT(NULL);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;right after main()&lt;/p&gt;
&lt;p&gt;I added RTT enable in a sdk_config.h&lt;/p&gt;
&lt;p&gt;Whats reason that no debug info?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115829?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 14:09:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29ae8c3f-733e-4262-bc30-f2ebb16a9f6e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Can you debug with your app, either by running in debug mode or printing log, checking if it&amp;#39;s getting to main and what kind of error it face ? We can&amp;#39;t debug with blackbox style like this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115845?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2017 08:21:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc76936b-a0af-4bed-be0b-17d629a9f85d</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;I located 2.hex by address 0x77800. Nrf52 qfaab0- mean 512k?. Bootloader starts from 0x78000. But after generated packed with bootloader and app. After flash SD and this generated packed - doesn&amp;#39;t work my app. Possible, my struct in 2.hex can&amp;#39;t read. What is my wrong?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115844?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2017 16:46:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe3240c6-b7f8-42fe-8fd3-734b180e810d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Ok, so please follow the guide to preserve application data. Make sure that the location of the 2.hex in flash match with the area preserved (X number of pages right under the bootloader) . If you use 512kB flash variant, you may need to move the 2.hex to address 0x77000 for example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115835?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2017 16:33:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a02ef59-5881-4d16-8cb0-e258acca5cee</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;sorry for one string text. Can&amp;#39;t edit it&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115834?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2017 16:31:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa1149fa-7dff-462f-9f60-02210e9f8dd4</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;My app depends from this struct in 2nd hex. If 2nd hex erased- my app will doesn&amp;#39;t work. It is normal.
For generate output boot hex, I use nrfutil.exe.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrfutil pkg generate --hw-version 52 --application-version 1 --application 1.hex --sd-req 0x98 --key-file private.key app_dfu_package.zip

nrfutil settings generate --family NRF52 --application 1.hex --application-version 0 --bootloader-version 0 --bl-settings-version 1 bootloader_setting.hex
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115833?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2017 15:44:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e01f8407-c55c-42a5-a40f-e31fcfff7e73</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mikhail,&lt;/p&gt;
&lt;p&gt;What did you use to generate the .zip file and the bootloader setting file ? using 1.hex ?&lt;/p&gt;
&lt;p&gt;One thing you can do to quickly check is to dump the flash out and compare before and after doing DFU. Then compare them.
Pay attention to the original application area, and the bootloader setting area. I suspect either the flash area 2 is erased (don&amp;#39;t know if it&amp;#39;s the reason your app stop working, it&amp;#39;s depend on your application), or the CRC checking inside bootloader setting no longer match with the content in the area of 1.hex&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115832?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2017 13:38:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebcaf9c4-a276-4acb-a0ad-890ed1d18b5b</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;in my bootloader (bootloader_secure_ble) we use single or dual bank updates?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115831?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2017 13:26:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20d022cf-2373-485f-8221-f6311d609a02</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;may be best way will use spetial zone for settings like discribed here:
&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.1.0/lib_bootloader_dfu_banks.html?cp=4_0_3_3_4_1_2_2#lib_bootloader_dfu_appdata"&gt;infocenter.nordicsemi.com/.../lib_bootloader_dfu_banks.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115830?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2017 13:25:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8437289f-cb57-4572-86e8-064f25bdf2f9</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Hi again!&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll try to explan again in more details: in the my app I have structure located by separate sddress-&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;struct_t abc __attribute__((section(&amp;quot;.ARM.__at_0x37800&amp;quot;))) = 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After compiling I have .hex. This .hex I manual divide for two .hex.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1&lt;/strong&gt;- 0x1F000 - 0x377FF
...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:1077F0000000000000000000000000000000000089
:00000001FF
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2&lt;/strong&gt; 0x 37800- 0x37940&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:0C7940002FC490D003146137022303FF12
:040000050001F20103
:00000001FF
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;Via nrf go studio I can flash SD than 1 and 2 .hex. Works fine.&lt;/p&gt;
&lt;p&gt;I can run merge with nrfutil.exe. And get merged
bootloader_setting.hex nrf52832_xxaa_s132.hex 1.hex --output boot_55.hex&lt;/p&gt;
&lt;p&gt;before I get .zip for DFU.&lt;/p&gt;
&lt;p&gt;Ok. Via nrf go studio erase all, flash SD, flash boot_55.hex, flash my hex 2 with struct.
Works fine.&lt;/p&gt;
&lt;p&gt;go next.
Transfer by UART command into bootload mode- ok. DFU upgrade-ok.
my same flashed app- does not work any more.
???&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU separate files. inside</title><link>https://devzone.nordicsemi.com/thread/115828?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2017 12:56:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28870a6b-4bb5-4191-ae4e-473ef4a37752</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mikhail,&lt;/p&gt;
&lt;p&gt;What exactly you mean nRF doesn&amp;#39;t work more ? Have you tried to debug if it can get to main() in the application ? Would it be the result of your application data being erased ?&lt;/p&gt;
&lt;p&gt;Where do you locate the your application data ? If you want to preserve your data you need to follow &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.1.0/lib_bootloader_dfu_banks.html?cp=4_0_3_3_4_1_2_2#lib_bootloader_dfu_appdata"&gt;this guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Note that the bootloader assume the application data starts right before the beginning of the bootloader.&lt;/p&gt;
&lt;p&gt;Make sure you also count the room for fds data if you use that module (by default used by peer manager)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>