<?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>nRF52840 with SDK v17 - Application CRC check in secure bootloader always fails</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77203/nrf52840-with-sdk-v17---application-crc-check-in-secure-bootloader-always-fails</link><description>Hi, 
 My dev environment is as follows: 
 nrf52840 + s140 +SD7.0.1 + SDK17.0.0.9 + SES + nrfutil v6.1.0 
 I started my development for DFU and utilized secure buttonless DFU bootloader provided along with SDK. Things worked well. I also wrote a post build</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 14 Jul 2021 13:43:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77203/nrf52840-with-sdk-v17---application-crc-check-in-secure-bootloader-always-fails" /><item><title>RE: nRF52840 with SDK v17 - Application CRC check in secure bootloader always fails</title><link>https://devzone.nordicsemi.com/thread/320050?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 13:43:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15730768-e671-4a0c-9911-a1ec7ab58018</guid><dc:creator>PriyeshN</dc:creator><description>&lt;p&gt;Thanks Hung,&lt;/p&gt;
&lt;p&gt;I tried with 10.11.1 version of mergehex and now it works. Although, the read file (from nrfConnect programmer) and the merged hex still do not match (too many differences), but the functionality is working i.e. CRC check in bootloader is passing and code flow is now starting the application.&lt;/p&gt;
&lt;p&gt;I agree with the comments from other members &lt;a href="https://devzone.nordicsemi.com/members/farhangj"&gt;Farhang&lt;/a&gt; &amp;amp; &lt;a href="https://devzone.nordicsemi.com/members/droberson"&gt;droberson&lt;/a&gt; on below post:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/69940/nrf52840---problems-merging-and-flashing-secure_bootloader_uart_mbr_pca10056-and-ble_app_uart_pca10056_s140/286885"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/69940/nrf52840---problems-merging-and-flashing-secure_bootloader_uart_mbr_pca10056-and-ble_app_uart_pca10056_s140/286885&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;to have a warning flag against the new mergehex versions. Or a better suggestion would be to either&amp;nbsp; resolve the bug and update mergehex or simply remove the buggy files from release section. This is simply wasting time of developers analyzing, debugging the issue before they post here as last retort.&lt;/p&gt;
&lt;p&gt;Convey my thanks to &lt;a href="https://devzone.nordicsemi.com/members/vibe"&gt;Vidar Berg&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with SDK v17 - Application CRC check in secure bootloader always fails</title><link>https://devzone.nordicsemi.com/thread/319996?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 12:00:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:edd87ed2-6906-4a42-b08d-57292b43bda2</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Please try to test with older version of mergehex as suggested by Vidar.&amp;nbsp;&lt;br /&gt;The flash dump after you flash 4 files separatedly and the flash dump after you flashed the merged hex file should be the same.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with SDK v17 - Application CRC check in secure bootloader always fails</title><link>https://devzone.nordicsemi.com/thread/319960?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 09:12:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69087cac-21eb-40ed-abd6-d54407649af9</guid><dc:creator>PriyeshN</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;I use the mergehex to merge different hex files only and not to generate DFU package. DFU package is generated using nrfutil.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Priyesh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with SDK v17 - Application CRC check in secure bootloader always fails</title><link>https://devzone.nordicsemi.com/thread/319959?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 09:09:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e758d48c-9e20-4bf4-a2d9-0a2591bfdc86</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Priyesh,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I assume you only use mergehex for programming the device via SWD (programmer) interface not for generating the .zip file to do DFU ?&amp;nbsp;&lt;br /&gt;There is a chance that it&amp;#39;s an issue with the mergehex file. Please have a look at this case:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/69987/latest-mergehex-output-fails-to-be-programmed-mergehex-9-8-1-produces-different-hex-than-10-12-1"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/69987/latest-mergehex-output-fails-to-be-programmed-mergehex-9-8-1-produces-different-hex-than-10-12-1&lt;/a&gt;&lt;br /&gt;You may need to use older version of mergehex.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with SDK v17 - Application CRC check in secure bootloader always fails</title><link>https://devzone.nordicsemi.com/thread/319715?ContentTypeID=1</link><pubDate>Tue, 13 Jul 2021 07:52:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd158cb3-782d-4cbc-b58c-e74126ad00f1</guid><dc:creator>PriyeshN</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Torbj&amp;oslash;rn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I was in impression that mergehex got installed along with nrfutil as I never explicitly&amp;nbsp;installed/used mergehex. Also, I followed the instructions on Nordic page for the usage of mergehex for merging the hex files:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/getting-started-with-nordics-secure-dfu-bootloader#h61sjziauupw1j397q9s9ldr01q4j6d5"&gt;https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/getting-started-with-nordics-secure-dfu-bootloader#h61sjziauupw1j397q9s9ldr01q4j6d5&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Appendix - Bullet 1 - &amp;quot;&lt;/span&gt;Combine application, bootloader and softdevice image - Bootloader setting&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;On the link you shared for nrfutil, I don&amp;#39;t see any help for merging the hex using nrfutil. Can you please help me in merging hex using nrfutill.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Priyesh&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with SDK v17 - Application CRC check in secure bootloader always fails</title><link>https://devzone.nordicsemi.com/thread/319710?ContentTypeID=1</link><pubDate>Tue, 13 Jul 2021 07:26:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2dcf78dd-50b2-4cd8-82e7-1f28f73f2231</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Priyesh&lt;/p&gt;
&lt;p&gt;My bad, talking to one of the DFU experts I realized mergehex is not supposed to be used for DFU purposes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Instead you should use the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrfutil%2FUG%2Fnrfutil%2Fnrfutil_intro.html"&gt;nrfutil tool&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;mergehex is only intended for use with nrfjprog, to allow you to program both application and SoftDevice in a single operation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with SDK v17 - Application CRC check in secure bootloader always fails</title><link>https://devzone.nordicsemi.com/thread/319586?ContentTypeID=1</link><pubDate>Mon, 12 Jul 2021 12:13:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39088fd3-e9cb-4b33-b196-17cb08c3eb19</guid><dc:creator>PriyeshN</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Torbj&amp;oslash;rn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I do see some differences between two hex files, 10 hex records to be exact. Rest file matches entirely. The records are distributed throughout and not contiguous&amp;nbsp;and neither&amp;nbsp;bunched at the file boundary.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Priyesh&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with SDK v17 - Application CRC check in secure bootloader always fails</title><link>https://devzone.nordicsemi.com/thread/319577?ContentTypeID=1</link><pubDate>Mon, 12 Jul 2021 11:49:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fa94b02-ea22-4616-b389-d4caa45b7c7f</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Priyesh&lt;/p&gt;
&lt;p&gt;Very interesting, thanks for sharing your results.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you try to compare the resulting hex files you got from mergehex and srec_cat.exe respectively, to see if there are any big differences?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with SDK v17 - Application CRC check in secure bootloader always fails</title><link>https://devzone.nordicsemi.com/thread/319289?ContentTypeID=1</link><pubDate>Fri, 09 Jul 2021 07:30:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:364b0567-e881-4699-a8d1-9b0e2da4e88f</guid><dc:creator>PriyeshN</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Torbj&amp;oslash;rn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for looking into this.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, your expectation is correct. I did compare the two hex files and the application hex is smaller as the debug information is stripped.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have an update for you on this. I was working on this yesterday and I tried by flashing all the 4 hex files separately&amp;nbsp;(I prefer Jflash-lite) and surprisingly, &lt;strong&gt;it worked&lt;/strong&gt;. :)&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;As my&amp;nbsp;curiosity increased, I then doubted the &lt;em&gt;mergehex&lt;/em&gt; utility. So, I went ahead and tried the ARM suggested &lt;em&gt;srec_cat.exe&lt;/em&gt; utility to merge the hex files, and yes, this is also working.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have updated my post-script files to use srec_cat utility for now, but, still don&amp;#39;t know why there is such behavior.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Priyesh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 with SDK v17 - Application CRC check in secure bootloader always fails</title><link>https://devzone.nordicsemi.com/thread/319288?ContentTypeID=1</link><pubDate>Fri, 09 Jul 2021 07:21:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0127fe4a-2d49-408a-b591-d1909bd0899a</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Priyesh&lt;/p&gt;
&lt;p&gt;I assume you did the same exercise of merging the hex files after you optimized the release configuration?&lt;/p&gt;
&lt;p&gt;Have you tried to compare the two hex files and see if there are any big differences?&lt;/p&gt;
&lt;p&gt;Based on your comments I believe the only result should be that the application part is smaller, since there is no debug information and log functionality, or are there other changes?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>