<?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>Merged binary (.bin) of SoftDevice + application bricking devices, differs from the merged hex when flashed?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110591/merged-binary-bin-of-softdevice-application-bricking-devices-differs-from-the-merged-hex-when-flashed</link><description>I&amp;#39;m attempting to generate a binary blob containing both the S140 SoftDevice (to be placed at address 0x1000 in flash) and the main application firmware (at 0x26000). 
 I use the following command to generate a merged hex: mergehex --merge ./main_app</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 May 2024 23:29:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110591/merged-binary-bin-of-softdevice-application-bricking-devices-differs-from-the-merged-hex-when-flashed" /><item><title>RE: Merged binary (.bin) of SoftDevice + application bricking devices, differs from the merged hex when flashed?</title><link>https://devzone.nordicsemi.com/thread/482141?ContentTypeID=1</link><pubDate>Mon, 06 May 2024 23:29:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:258438bc-d8bc-4ef2-ba7d-2b3dd5d6bb13</guid><dc:creator>rbmarcus</dc:creator><description>&lt;p&gt;This turned out to be what was going wrong. Thank you &lt;a href="https://devzone.nordicsemi.com/members/eith"&gt;Einar Thorsrud&lt;/a&gt;&amp;nbsp; and &lt;a href="https://devzone.nordicsemi.com/members/hnhoan"&gt;Nguyen Hoan Hoang&lt;/a&gt;&amp;nbsp;for responding and pointing out the problem, and I apologize for my initial skepticism. It&amp;#39;s on me for trusting the build process I was given instead of doing my own research to confirm. I&amp;#39;m still not sure why the binary works, but since it doesn&amp;#39;t match the size of a binary created from the stock hex, maybe the previous devs removed the MBR from it? I can share our internal version of the S140 6.0.0 SoftDevice if anyone is interested, but aside from that everything is clear going forward. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Merged binary (.bin) of SoftDevice + application bricking devices, differs from the merged hex when flashed?</title><link>https://devzone.nordicsemi.com/thread/480582?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2024 07:10:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11af13f4-a8ca-459e-98c3-92d5de2d010f</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/hnhoan"&gt;Nguyen Hoan Hoang&lt;/a&gt;&amp;nbsp; is correct. The All SoftDevice .hex file we distribute includes the MBR and must be flashed at address 0 (the MBR is also available as a separate .hex for projects that does not use the SoftDevice, but that is a different matter).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Merged binary (.bin) of SoftDevice + application bricking devices, differs from the merged hex when flashed?</title><link>https://devzone.nordicsemi.com/thread/480563?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2024 03:56:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdb427bc-4990-440d-a042-6c0453a14df1</guid><dc:creator>rbmarcus</dc:creator><description>&lt;p&gt;Directly flashing the SoftDevice works, regardless of whether I flash it as a hex or as a binary at address 0x1000. If the MBR is contained within the SoftDevice hex, I would expect a duplicate MBR in flash to cause issues since it would shift the remaining SoftDevice data to different addresses, but that doesn&amp;rsquo;t seem to be the case here. &lt;/p&gt;
&lt;p&gt;Maybe it&amp;rsquo;s redundant by design to prevent user error? My assumption was that the MBR is a separate blob flashed alongside the SoftDevice, and the process is abstracted away when using SES or similar. I opt for CLI-based building and flashing whenever possible so I have no basis for this assumption, but over CLI I flash the MBR and SoftDevice separately with no problems so far. &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Merged binary (.bin) of SoftDevice + application bricking devices, differs from the merged hex when flashed?</title><link>https://devzone.nordicsemi.com/thread/480557?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2024 02:29:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:784a7427-4a90-46aa-abf5-37eb40ceb7ef</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;Now I think I get it. The thing is that Softdevice hex also has MBR at 0 inside. &amp;nbsp;When you merge the hex, it will automatically override your MBR at 0. &amp;nbsp;So everything is back to normal location.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Merged binary (.bin) of SoftDevice + application bricking devices, differs from the merged hex when flashed?</title><link>https://devzone.nordicsemi.com/thread/480554?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2024 02:23:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5148bfb0-d4c1-4c04-88d2-8cbc950c0dfd</guid><dc:creator>rbmarcus</dc:creator><description>&lt;p&gt;To my knowledge this is incorrect. I have a MBR at 0x0, and it cannot be placed elsewhere. This is a mature project that has always had its SoftDevice placed at 0x1000.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Most of the information I&amp;rsquo;ve provided in the original post outlines what I tried that has and hasn&amp;rsquo;t worked. I do have a working solution for my use case (concatenating the binaries over CLI and piping the output into a separate file), but I&amp;rsquo;d like to figure out why a merged hex converted to a binary produces a different outcome than converting both individual hex files into binaries and flashing them separately.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Merged binary (.bin) of SoftDevice + application bricking devices, differs from the merged hex when flashed?</title><link>https://devzone.nordicsemi.com/thread/480550?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2024 01:44:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16449a0d-561f-4f2e-82aa-a5c24233eecf</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;What worked and what didn&amp;#39;t work exactly ? Softdevice has to be flashed at 0 not 0x1000. &amp;nbsp;Why Softdevice to be placed at 0x1000?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>