<?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>Inclusion of ~110kb uncompressed / ~15kb compressed binary blob in DFU image ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64997/inclusion-of-110kb-uncompressed-15kb-compressed-binary-blob-in-dfu-image</link><description>Hi, 
 We have a Lattice Ice40 UltraPlus FPGA, SPI FLASH, and nRF52832. We would like to be able to include the FPGA&amp;#39;s binary image in our DFU package but it is about 110kb uncompressed (or 15kb compressed with zip or gzip). We have been able to include</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 20 Aug 2020 00:28:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64997/inclusion-of-110kb-uncompressed-15kb-compressed-binary-blob-in-dfu-image" /><item><title>RE: Inclusion of ~110kb uncompressed / ~15kb compressed binary blob in DFU image ?</title><link>https://devzone.nordicsemi.com/thread/265429?ContentTypeID=1</link><pubDate>Thu, 20 Aug 2020 00:28:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0374381a-0ebc-42ed-bd17-d635581e6073</guid><dc:creator>Scott</dc:creator><description>&lt;p&gt;Got it working / thanks !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inclusion of ~110kb uncompressed / ~15kb compressed binary blob in DFU image ?</title><link>https://devzone.nordicsemi.com/thread/265420?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2020 21:55:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:385f9ca4-7624-4462-bcd3-423e5fdb4dbd</guid><dc:creator>Scott</dc:creator><description>&lt;p&gt;Is there an example linker script to show me how to do that ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inclusion of ~110kb uncompressed / ~15kb compressed binary blob in DFU image ?</title><link>https://devzone.nordicsemi.com/thread/265419?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2020 21:15:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9894a63-8bb5-4e31-ae68-bb8a4964104d</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Nope, &amp;quot;.rodata&amp;quot; section is flash.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inclusion of ~110kb uncompressed / ~15kb compressed binary blob in DFU image ?</title><link>https://devzone.nordicsemi.com/thread/265417?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2020 20:45:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a22a8c4c-eba8-4bb8-b16f-472ad1f2390a</guid><dc:creator>Scott</dc:creator><description>&lt;p&gt;As far as I can tell that just puts it into the RAM section‥&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inclusion of ~110kb uncompressed / ~15kb compressed binary blob in DFU image ?</title><link>https://devzone.nordicsemi.com/thread/265412?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2020 19:27:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d49201e-4b8d-4e0d-82bc-29bba310195f</guid><dc:creator>Scott</dc:creator><description>&lt;p&gt;Ah if we store it like that then it will be stored in FLASH not the RAM space ? Didn&amp;#39;t realise that thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inclusion of ~110kb uncompressed / ~15kb compressed binary blob in DFU image ?</title><link>https://devzone.nordicsemi.com/thread/265396?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2020 15:39:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7478d785-6e6d-492e-8f31-8c67821f6a2b</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;The nRF52832 has not enough RAM to handle zlib uncompression AFAIK. Only the NRF52840 would have enough RAM - but it would also have enough flash to store uncompressed.&lt;/p&gt;
&lt;p&gt;If you had enough free flash available in your application space, you can store the image data in flash memory.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;One simple way to convert the data is to use &amp;quot;xxd&amp;quot;:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="bat"&gt;xxd -i &amp;lt;data.bin &amp;gt;data.bin.h&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And then just include the .h file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;const uint8_t binary_data[] = {
#include &amp;quot;data.bin.h&amp;quot;
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>