<?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>Flashing .bin file using nrfjprog command line</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84264/flashing-bin-file-using-nrfjprog-command-line</link><description>Hi, 
 I am using nordic52840 dk board. 
 And i want to flash a bin file using nrfjprog command line. 
 For Hex file i am using below command 
 nrfjprog --reset --program blinky_pca10056.hex --family NRF52 
 
 But what changes requires to flash .bin instead</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 Feb 2022 10:05:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84264/flashing-bin-file-using-nrfjprog-command-line" /><item><title>RE: Flashing .bin file using nrfjprog command line</title><link>https://devzone.nordicsemi.com/thread/350813?ContentTypeID=1</link><pubDate>Wed, 02 Feb 2022 10:05:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56d90acf-74b1-438e-840c-ed2994d7e693</guid><dc:creator>R_S</dc:creator><description>&lt;p&gt;Thanks Edvin for your support&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing .bin file using nrfjprog command line</title><link>https://devzone.nordicsemi.com/thread/350785?ContentTypeID=1</link><pubDate>Wed, 02 Feb 2022 08:01:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9e5b640-6a68-43aa-af7b-3354a3aa441f</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok, so I got to test this today. Using the objcopy tool from &lt;a href="https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads/9-2019-q4-major"&gt;armgcc 9 2019-q4-major&lt;/a&gt;&amp;nbsp;I could convert the bin file to a hex file. I then programmed that generated hex file, and it worked as expected:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1643788911939v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I have reported the issue with --program .bin files internally to our nRF Command Line tools team. Thank you for reporting this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing .bin file using nrfjprog command line</title><link>https://devzone.nordicsemi.com/thread/350779?ContentTypeID=1</link><pubDate>Wed, 02 Feb 2022 07:30:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1aa24ba-a080-489f-95ed-672b1fc60c57</guid><dc:creator>R_S</dc:creator><description>&lt;p&gt;Using ICC ARM only. and its creating .hex file as well.&lt;/p&gt;
&lt;p&gt;ANd i can also create .bin as well. But the issue is sometime there is the difference between the .hex and .bin. Thats y i want to load the .bin file from nrfjprog.&lt;/p&gt;
&lt;p&gt;But anyway i am able to flash .bin with J-flash lite tool.&lt;/p&gt;
&lt;p&gt;And thanks for &amp;quot;&lt;span&gt;arm-none-eabi-objcopy&amp;quot; command.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Rregards&lt;/p&gt;
&lt;p&gt;Rohit Saini&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing .bin file using nrfjprog command line</title><link>https://devzone.nordicsemi.com/thread/350718?ContentTypeID=1</link><pubDate>Tue, 01 Feb 2022 14:54:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8954704-5240-482c-aa88-70dea8122999</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hmm. I also see that it doesn&amp;#39;t work using v 10.15.2 external. I&amp;#39;ll look into this internally.&lt;/p&gt;
&lt;p&gt;But what compiler do you use if it doesn&amp;#39;t provide a .hex file?&lt;/p&gt;
&lt;p&gt;arm-none-eabi is part of GCC (not nrfjprog). If you have it installed on your computer, you will probably find it in:&lt;br /&gt;C:\Program files (x86)\GNU Tools ARM Embedded\&amp;lt;version&amp;gt;\bin\arm-none-eabi-objcopy.exe&lt;/p&gt;
&lt;p&gt;Make sure to add the path, wich in my case is &amp;quot;C:\Program Files (x86)\GNU Tools ARM Embedded\9 2019-q4-major\&amp;quot; to path:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1643727279993v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing .bin file using nrfjprog command line</title><link>https://devzone.nordicsemi.com/thread/350696?ContentTypeID=1</link><pubDate>Tue, 01 Feb 2022 13:51:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68d3627f-5868-48c9-9576-c3bb42b39d9a</guid><dc:creator>R_S</dc:creator><description>&lt;p&gt;Yes i tried it. but didn&amp;#39;t work for me as well.&lt;/p&gt;
&lt;p&gt;I have the new version of nrfjprog.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1643723166843v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;And in the previous answer you mentioned the link to convert bin to hex file.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;arm-none-eabi-objcopy -I binary -O ihex filename.bin filename.hex&lt;br /&gt;&lt;/code&gt;by using this command.&lt;br /&gt;&lt;br /&gt;So my question is where i need to run this command &amp;quot;arm-none-eabi-objcopy&amp;quot;...?&lt;br /&gt;or Do i need to install something for this. &lt;br /&gt;&lt;br /&gt;because i simply try it to run in command line only where i used to run nrfjprog commands.&lt;br /&gt;&lt;br /&gt;Correct me if the way i am doing is not correct!&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Rohit Saini&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing .bin file using nrfjprog command line</title><link>https://devzone.nordicsemi.com/thread/350671?ContentTypeID=1</link><pubDate>Tue, 01 Feb 2022 12:35:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ec50016-0857-4a37-a3ce-1c4796285b32</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hehe I actually checked this before I answered, but I guess I have an older version installed than you. This is what mine said:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;     --program &amp;lt;hex_file&amp;gt; [--sectorerase | --chiperase | --sectoranduicrerase |
                              --recover] [--qspisectorerase | --qspichiperase]
                             Programs the specified image_file into the device.
                             If the target area to program is not erased, the
                             --program operation will fail unless an erase
                             option is given. Valid erase operations for
                             the internal flash memory are --recover,
                              --sectorerase, --sectoranduicrerase and
                              --chiperase. If --chiperase is given, all the
                             available user non-volatile memory, including
                             UICR, will be erased before programming. If
                             --recover is given, all the available user
                             non-volatile memory, including UICR, will
                             be erased before programming, even if the
                             device is readback protected.
                             If --sectorerase is given, only the targeted
                             non-volatile memory pages excluding UICR will
                             be erased. If --sectoranduicrerase is given,
                             only the targeted non-volatile memory pages
                             including UICR will be erased. Note that the
                             --sectoranduicrerase and --sectorerase
                             operations normally take significantly longer time
                             compared to --chiperase operation so use them with
                             caution. If your device is equipped witha QSPI
                             peripheral and an external memory device is
                             present, data targeting the XIP region will be
                             written to the external memory device.
                             The first address of the XIP region
                             is considered as address 0 of the external memory
                             device. To determine if an external memory device
                             is present, nrfjprog checks the MemSize paramter
                             from QspiDefault.ini file or from the QSPI
                             configuration ini file given with the --qspiini
                             option. If the target area to program is not
                             erased, the --program operation will fail unless
                             an erase option is given. Valid erase operations
                             for the external memory device are --qspichiperase
                             and --qspisectorerase. If --qspichiperase is
                             given, the external memory device will be erased.
                             If the --qspisectorerase is given, only 4kB pages
                             pages from the targeted external memory device
                             will be erased. Note that --qspichiperase
                             operation may take several minutes. The --program
                             command can be combined with the --verify
                             operation. It can also be combined with either the
                             --reset or the --debugreset operations. the reset
                             will occur after the flash operation in order to
                             start the execution.
                             Limitations:
                             For nRF51 devices, the --sectoranduicrerase
                             operation is not available.
                             For nRF51 devices, if the image_file provided
                             contains sectors belonging to region 0, the
                             --program operation will fail.
                             For nRF51 devices, the --qspisectorerase and
                             --qspichiperase operations are not available.
                             For nRF52 devices, the --qspisectorerase and
                             --qspichiperase operations are not available
                             unless the device is equipped with a QSPI
                             peripheral and an external memory is connected. To
                             determine if an external memory is present, the
                             MemSize parameter from QspiDefault.ini file or
                             from the QSPI configuration ini file given with
                             the --qspiini option is evaluated.
                             For nRF91 devices, the --qspisectorerase and
                             --qspichiperase operations are not available.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;(I am currently using version 10.12.1)&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1643718890932v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;If it says that .bin files are supported, then I guess you can just replace the .hex file with the bin file in your nrfjprog command:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;nrfjprog --reset --program blinky_pca10056.hex --family NRF52&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Did you test?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing .bin file using nrfjprog command line</title><link>https://devzone.nordicsemi.com/thread/350638?ContentTypeID=1</link><pubDate>Tue, 01 Feb 2022 11:30:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2805c9cf-74a4-4f60-8910-7c64c6196a6a</guid><dc:creator>R_S</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for reply. but i can see on the help command that it support for .bin format as well.&lt;/p&gt;
&lt;p&gt;I attached that image below&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/jprog_5F00_bin.PNG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing .bin file using nrfjprog command line</title><link>https://devzone.nordicsemi.com/thread/350621?ContentTypeID=1</link><pubDate>Tue, 01 Feb 2022 10:34:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:391f68b2-2d7c-4a35-ada5-006ee59dc8db</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Why do you need to program the .bin file?&lt;/p&gt;
&lt;p&gt;nrfjprog only accept .hex files. Perhaps you can look into converting the .bin file to a .hex file first?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/28074/tools-to-convert-binary-data-file-to-hex-compatible-with-nrfjprog"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/28074/tools-to-convert-binary-data-file-to-hex-compatible-with-nrfjprog&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>