<?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>Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96744/generating-binaries-on-vscode-with-prepended-zeroed-header-to-the-image</link><description>Hello , 
 
 I am using nrf Connect SDK v1.9.1 with nRF Connect extension for my application development. 
 With reference to the nordic documentation : https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/imgtool.html#incorporating-the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Apr 2023 10:25:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96744/generating-binaries-on-vscode-with-prepended-zeroed-header-to-the-image" /><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/420974?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2023 10:25:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76148522-832b-498e-a3d1-f154aadf1ddb</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hi ,&lt;br /&gt;&lt;br /&gt;Found no way finally&lt;br /&gt;Manually editing the binaries.&lt;br /&gt;So marking this as closed.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/app_5F00_update_5F00_DFU_5F00_v3.bin"&gt;devzone.nordicsemi.com/.../app_5F00_update_5F00_DFU_5F00_v3.bin&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/414102?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2023 11:39:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f3f6c5c-723f-440e-bf43-ae0ae3403b49</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;I got an idea:&lt;/p&gt;
&lt;p&gt;The &amp;quot;-vvv&amp;quot; option to west will make it more verbose, making the build print the command used for creating the binaries.&lt;/p&gt;
&lt;p&gt;Can you build both for Zephyr and for the nRF Connect SDK with this?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west -vvv build -p -b &amp;lt;board_name&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then post the build log for both here using &amp;quot;Insert-&amp;gt;Code&amp;quot;.&lt;/p&gt;
&lt;p&gt;This way, we can compare the generations of the different binaries to try and find the&amp;nbsp; difference.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/414084?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2023 10:49:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4a369df-95c6-48a0-a977-71247b7fd271</guid><dc:creator>Ubaid_M</dc:creator><description>[quote userid="106736" url="~/f/nordic-q-a/96744/generating-binaries-on-vscode-with-prepended-zeroed-header-to-the-image/413721"]What is the point of padding the start of the binary?[/quote]
&lt;p&gt;I have a custom binary signing server, to pass the binaries to the server, I need my binaries to be prepended with zero header.&lt;br /&gt;&lt;br /&gt;As it will mark the header.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/413721?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2023 08:16:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5322234f-4926-47ce-9ab2-6bd37cd47d8a</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;In that case, it does not look like &lt;span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_FLASH_LOAD_OFFSET"&gt;CONFIG_FLASH_LOAD_OFFSET&lt;/a&gt; is what you need.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I think I may need some more information to find another solution here.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What is your end goal?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What is the point of padding the start of the binary?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/413380?ContentTypeID=1</link><pubDate>Sun, 05 Mar 2023 10:12:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a94d6eee-a91a-4719-a251-5bbe0e27c360</guid><dc:creator>Ubaid_M</dc:creator><description>[quote userid="108934" url="~/f/nordic-q-a/96744/generating-binaries-on-vscode-with-prepended-zeroed-header-to-the-image/412765"]Please suggest how do I achieve this..?[/quote]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/412765?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 13:45:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdd186f5-c33f-4427-9de7-cd37012bbe32</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello Sigurd,&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1677678287284v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried all possible combinations and yet as you can see couldn&amp;#39;t achieve a binary with 0x00 to 0x200 prepended with zeros and 0x200 onwards having image data.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please suggest how do I achieve this..?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/412489?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 12:12:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29691c47-e8f7-4c74-a7fc-737c20537025</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;I suggest that you try to build for different numbers of &lt;span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_FLASH_LOAD_OFFSET"&gt;CONFIG_FLASH_LOAD_OFFSET&lt;/a&gt;.&lt;br /&gt;Then you can compare output binaries to test if this is the configuration you were looking for.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/412432?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 09:19:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:958d6aad-305f-4775-b63b-76eeaefcb7f3</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;span&gt;Sigurd Hellesvik,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can you please suggest on use of&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_FLASH_LOAD_OFFSET"&gt;CONFIG_FLASH_LOAD_OFFSET&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/411661?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2023 12:45:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce4bc422-a661-4bdd-b790-9148db8277f8</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Sure will try, Thanks&lt;br /&gt;&lt;br /&gt;So It will look like&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_FLASH_LOAD_OFFSET"&gt;CONFIG_FLASH_LOAD_OFFSET&lt;/a&gt;=0x00&lt;br /&gt;Or&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_FLASH_LOAD_OFFSET"&gt;CONFIG_FLASH_LOAD_OFFSET&lt;/a&gt;=0x200&lt;br /&gt;..?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/411659?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2023 12:40:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41fb1480-74d8-4956-8df7-7e6bbc14bf8c</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;I think it could be, but I am not 100% certain.&lt;/p&gt;
&lt;p&gt;But I suggest that you give it a try on a development device.&lt;/p&gt;
&lt;p&gt;&lt;span style="margin:0;padding:0;text-align:left;"&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/411654?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2023 12:34:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77c62a2e-d75a-4879-8e93-7c8c04ae8e71</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Can I set&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_FLASH_LOAD_OFFSET"&gt;CONFIG_FLASH_LOAD_OFFSET&lt;/a&gt;&amp;nbsp;and my binary will look like LHS binary above&lt;span&gt;?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/411642?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2023 12:15:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe348312-765f-48b8-a1b0-646b91e6b6c6</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Are you looking for &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_FLASH_LOAD_OFFSET"&gt;CONFIG_FLASH_LOAD_OFFSET&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/411524?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2023 06:35:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1ecfa18-622e-4c03-bbd6-1872d2023f6a</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello Sigurd,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Sorry, there seems to have been some miscommunication.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/pastedimage1676534548401v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;2 cases:&lt;/p&gt;
&lt;p&gt;1. With the attached image, If image starts at 0x000210 address in memory, you can see the on LHS image that from address 0x00000 up until 000210 there is zeros prepended.!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;2. Whereas same image, when built with nCS on vscode, starts with 000000, straight away with data without no prepended zeros. Now I assume linker scripts may copy this at appropriate memory location as it is working.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;But my problem is, how do I generate binary as in the first case using nCS VScode..?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/411256?ContentTypeID=1</link><pubDate>Wed, 22 Feb 2023 07:57:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90d463aa-c088-4563-8eaf-f8676844d93e</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;From the same hello_world sample mentioned below, I take build/zephyr/zephyr.bin and convert it to hex using &lt;a href="https://pypi.org/project/intelhex/"&gt;bin2hex.py&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;bin2hex.py zephyr.bin converted_zephyr.hex
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The resulting hex-file also has this padding:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1677052538072v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/converted_5F00_zephyr.hex"&gt;devzone.nordicsemi.com/.../converted_5F00_zephyr.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/411239?ContentTypeID=1</link><pubDate>Wed, 22 Feb 2023 06:49:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:265dbafd-74e2-402a-affa-63c770a76823</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/sigurd-hellesvik"&gt;Sigurd Hellesvik&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So now how will I achieve this on my bin files..?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote userid="106736" url="~/f/nordic-q-a/96744/generating-binaries-on-vscode-with-prepended-zeroed-header-to-the-image/410653"]Aha, so you want to get the Zero padding.[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/411120?ContentTypeID=1</link><pubDate>Tue, 21 Feb 2023 13:40:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53bb544f-251c-4e86-ae3b-b3d330381d70</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I realize that you will need a bootloader if you offset the image in flash, as the chip will start at address 0x0000.&lt;/p&gt;
&lt;p&gt;If you enable MCUboot in an nRF Connect SDK project, the address off zephyr.hex will be offset:&lt;/p&gt;
&lt;p&gt;Here is a sample from zephyr.hex in the hello_world sample with CONFIG_BOOTLOADER_MCUBOOT=y:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1676986712914v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Does this help?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/411018?ContentTypeID=1</link><pubDate>Tue, 21 Feb 2023 08:14:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc980d5e-9133-491b-998e-e66b8facaa72</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/sigurd-hellesvik"&gt;Sigurd Hellesvik&lt;/a&gt;,&lt;/p&gt;
[quote userid="106736" url="~/f/nordic-q-a/96744/generating-binaries-on-vscode-with-prepended-zeroed-header-to-the-image/410653"]Aha, so you want to get the Zero padding.[/quote]
&lt;p&gt;Yes, This is what I need.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="106736" url="~/f/nordic-q-a/96744/generating-binaries-on-vscode-with-prepended-zeroed-header-to-the-image/410653"]Do you build with MCUboot for both projects?&lt;br /&gt;Do you see the same issue if you build without MCUboot for both projects?[/quote]
&lt;p&gt;Yes, I tried without mcuboot configured build and found that still generated binaries do not have zero prepended.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/410653?ContentTypeID=1</link><pubDate>Fri, 17 Feb 2023 13:12:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ab037bc-43d7-4212-b3ae-d1f74a70a001</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Ubaid_M"]Also, I have never used CLI build, please help me where I can fire the commands.[/quote]
&lt;p&gt;For VS Code, press the arrow beside the &amp;quot;+&amp;quot; sign in the terminal view.&lt;br /&gt;Then select &amp;quot;nRF Connect SDK&amp;quot;. Now you should get a CLI below to type commands.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1676639444078v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="Ubaid_M"]&lt;strong&gt;Now If I build simple LED code, on zephyr RTOS+eclipse, I am getting zero prepended &amp;quot;zephyr.bin&amp;quot;.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;While for same code if I build on nRF Connect Extension on vscode, I am not getting zero prepended &amp;quot;zephyr.bin&amp;quot;.&lt;/strong&gt;[/quote]
&lt;p&gt;Aha, so you want to get the Zero padding.&lt;/p&gt;
&lt;p&gt;Do you build with MCUboot for both projects?&lt;br /&gt;Do you see the same issue if you build without MCUboot for both projects?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/410583?ContentTypeID=1</link><pubDate>Fri, 17 Feb 2023 10:07:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4539c7af-abf0-4bd5-b248-e9055bdd57e5</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/sigurd-hellesvik"&gt;Sigurd Hellesvik&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the info.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;snap of comparision I attached is of zephyr.bin, Sorry I forgot to mention.&lt;/p&gt;
[quote userid="108934" url="~/f/nordic-q-a/96744/generating-binaries-on-vscode-with-prepended-zeroed-header-to-the-image"]&lt;p&gt;&lt;strong&gt;While the left image below is the binary i generated with just zephyr and no nCS. It clearly has zero padded header.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;cursor:zoom-in;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1676534548401v1.png" alt=" " /&gt;&lt;/p&gt;[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Now If I build simple LED code, on zephyr RTOS+eclipse, I am getting zero prepended &amp;quot;zephyr.bin&amp;quot;.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;While for same code if I build on nRF Connect Extension on vscode, I am not getting zero prepended &amp;quot;zephyr.bin&amp;quot;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So, I need to be able to build&amp;nbsp;&lt;strong&gt;zero prepended &amp;quot;zephyr.bin&amp;quot; from&lt;span&gt;&amp;nbsp;&lt;/span&gt;nRF Connect Extension on vscode.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I am attaching the partition file:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;app:
  address: 0xf200
  end_address: 0x70000
  region: flash_primary
  size: 0x60e00
external_flash:
  address: 0x0
  end_address: 0x100000
  region: external_flash
  size: 0x100000
mcuboot:
  address: 0x0
  end_address: 0xf000
  placement:
    before:
    - mcuboot_primary
  region: flash_primary
  size: 0xf000
mcuboot_pad:
  address: 0xf000
  end_address: 0xf200
  placement:
    before:
    - mcuboot_primary_app
  region: flash_primary
  size: 0x200
mcuboot_primary:
  address: 0xf000
  end_address: 0x6f000
  orig_span: &amp;amp;id001
  - mcuboot_pad
  - app
  region: flash_primary
  size: 0x60000
  span: *id001
mcuboot_primary_app:
  address: 0xf200
  end_address: 0x6f000
  orig_span: &amp;amp;id002
  - app
  region: flash_primary
  size: 0x5fe00
  span: *id002
mcuboot_secondary:
  address: 0x0
  device: IS25
  end_address: 0x60000
  placement:
    align:
      start: 0x4
  region: external_flash
  share_size:
  - mcuboot_primary
  size: 0x60000
settings_storage:
  address: 0x70000
  end_address: 0x80000
  placement:
    before:
    - end
  region: flash_primary
  size: 0x10000
sram_primary:
  address: 0x20000000
  end_address: 0x20020000
  region: sram_primary
  size: 0x20000
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, I have never used CLI build, please help me where I can fire the commands.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/410524?ContentTypeID=1</link><pubDate>Fri, 17 Feb 2023 08:02:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ca1b2f9-2b83-4029-9d13-32bb2c2074cb</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I will assume the file you refer to is build/zephyr/app_update.bin.&lt;/p&gt;
&lt;p&gt;Our build system automatically generates this file.&lt;br /&gt;To see the command used to generate this file, you can build using CLI and add &amp;quot;-vvv&amp;quot; to the west command like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west -vvv build -p -b nrf52840dk_nrf52840&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;From my code, the generation looks like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[19/24] cd /home/bruk/git/samples_for_nrf_connect_sdk/bootloader_samples/smp/mcuboot_smp_uart/build/modules/mcuboot &amp;amp;&amp;amp; /home/bruk/zephyr-sdk-0.15.1/arm-zephyr-eabi/bin/arm-zephyr-eabi-objcopy --input-target=ihex --output-target=binary --gap-fill=0xff /home/bruk/git/samples_for_nrf_connect_sdk/bootloader_samples/smp/mcuboot_smp_uart/build/zephyr/mcuboot_primary_app.hex /home/bruk/git/samples_for_nrf_connect_sdk/bootloader_samples/smp/mcuboot_smp_uart/build/zephyr/app_to_sign.bin &amp;amp;&amp;amp; /usr/bin/python3.10 /home/bruk/nrf_connect_sdk/bootloader/mcuboot/scripts/imgtool.py sign --key /home/bruk/nrf_connect_sdk/bootloader/mcuboot/root-ec-p256.pem --header-size 0x200 --align 4 --version 0.0.0+0 --pad-header --slot-size 0x7a000 /home/bruk/git/samples_for_nrf_connect_sdk/bootloader_samples/smp/mcuboot_smp_uart/build/zephyr/app_to_sign.bin /home/bruk/git/samples_for_nrf_connect_sdk/bootloader_samples/smp/mcuboot_smp_uart/build/zephyr/app_update.bin&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As you can see from this, imgtool generates the binary.&lt;/p&gt;
&lt;p&gt;You can try to generate app_update.bin manually from this command and then change arguments to your liking.&lt;/p&gt;
&lt;p&gt;Can you also send the contents of the partition_manager_report? Maybe the padding could be related to the partitions?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -t partition_manager_report&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/410518?ContentTypeID=1</link><pubDate>Fri, 17 Feb 2023 07:10:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7554f46-8296-4595-846a-b9f869eec099</guid><dc:creator>Ubaid_M</dc:creator><description>[quote userid="106736" url="~/f/nordic-q-a/96744/generating-binaries-on-vscode-with-prepended-zeroed-header-to-the-image/410436"]I will look into this and return with more information tomorrow.[/quote]
&lt;p&gt;Yes please,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating binaries on vscode with prepended zeroed header to the image</title><link>https://devzone.nordicsemi.com/thread/410436?ContentTypeID=1</link><pubDate>Thu, 16 Feb 2023 15:32:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e224b777-6c08-4522-8cc3-7a554e5c538a</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi Ubaid,&lt;/p&gt;
&lt;p&gt;I will look into this and return with more information tomorrow.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>