<?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>Question about path to hex file when using nrfjprog utility</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71277/question-about-path-to-hex-file-when-using-nrfjprog-utility</link><description>Hi, 
 
 The following command will not work: 
 
 &amp;gt; &amp;quot;/mnt/c/Program Files/Nordic Semiconductor/nrf-command-line-tools/bin/nrfjprog.exe&amp;quot; --family NRF52 --program &amp;quot;/mnt/c/Nordic Semiconductor/nRF5SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/s132/hex</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Feb 2021 11:52:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71277/question-about-path-to-hex-file-when-using-nrfjprog-utility" /><item><title>RE: Question about path to hex file when using nrfjprog utility</title><link>https://devzone.nordicsemi.com/thread/293743?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 11:52:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fcf9abf3-9de3-4025-ba87-10e0c172ea23</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Gudni"]&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;I can only guess the Windows version of nrfjprog is not designed to handle something like&lt;/span&gt; /mnt/c/[/quote]
&lt;p&gt;Correct. The Windows version of nrjprog expects paths to work as they normally do on Windows.&lt;/p&gt;
&lt;p&gt;Note that when running the command from a WSL terminal, the first path (to nrfjprog.exe, the executable) is interpreted by the shell. The path sent as argument, however, is interpreted by nrfjprog.exe.&lt;/p&gt;
&lt;p&gt;We have this now in our internal issue tracker, but it is a bit unclear how it should be handled and what is the expected behaviour for this kind of program invocation. Mixing native Windows command line tools with GNU/Linux tools is an area where conventions, assumptions, etc. quickly can become very messy...&lt;/p&gt;
&lt;p&gt;Maybe not intuitive at first glance, but the more I think about it, passing &amp;quot;Windows style&amp;quot; paths to a Windows command line application does sound reasonable, maybe even totally expected, even if invoked from a WSL command line.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about path to hex file when using nrfjprog utility</title><link>https://devzone.nordicsemi.com/thread/293732?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 11:06:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1669f00c-2a01-468b-9e6b-827732c46ee1</guid><dc:creator>Gudni</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/tesc"&gt;tesc&lt;/a&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;I am sorry for the delay.&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;No worries friend, I&amp;#39;m in no hurry and am just here to learn and have fun.&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f913.svg" title="Nerd"&gt;&amp;#x1f913;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;What version of nrfjprog is this? Have you tried with the latest version?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I am using the newest version of nrfjprog (10.12.1) 64-bit Windows version. You can see the version number in the top of the &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;log.log&lt;/span&gt; file. This is why I needed to add the &amp;quot;.exe&amp;quot; to the command call, but I&amp;#39;ve seen people use something called a&amp;nbsp;&lt;a href="https://linuxize.com/post/how-to-create-symbolic-links-in-linux-using-the-ln-command/"&gt;Linux Symbolic Link&lt;/a&gt; to make the system recognise only &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrfjprog&lt;/span&gt; instead of &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrfjprog.exe&lt;/span&gt;, but I haven&amp;#39;t learned to use that just yet.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am basically still a beginner when it comes to WSL2... and it seems to me WSL2 doesn&amp;#39;t support USB though I&amp;#39;m not 100% sure but that is what my quick Google searches seem to show :)&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;Have you tried the Linux version of&amp;nbsp;&lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Command-Line-Tools"&gt;nRF Command Line Tools&lt;/a&gt;, when you run it from WSL?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;I&amp;#39;ve tried and installed &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrfjprog&lt;/span&gt; directly inside my WSL &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;/opt/&lt;/span&gt; directory and&amp;nbsp;had&amp;nbsp;difficulties using J-link to flash, it&amp;#39;s not connecting to the debugger. It seems&lt;/span&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;&amp;nbsp;I must use the Windows version of &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrfjprog&lt;/span&gt; to use Windows version of J-link. Then the debugger connects as normal.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;After spending more time on this&lt;/span&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;.... this worked:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrfjprog.exe --family NRF52 --log --program C:/NordicSemiconductor/nRF5SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/s132/hex/s132_nrf52_7.2.0_softdevice.hex --snr 682436173&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;added a&lt;/span&gt;&amp;nbsp;C:/ &lt;span style="font-family:arial, helvetica, sans-serif;"&gt;before the hex file path instead of&lt;/span&gt; /mnt/c/ &lt;span style="font-family:arial, helvetica, sans-serif;"&gt;I can only guess the Windows version of nrfjprog is not designed to handle something like&lt;/span&gt; /mnt/c/&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about path to hex file when using nrfjprog utility</title><link>https://devzone.nordicsemi.com/thread/293589?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2021 14:43:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15880ba2-5b91-45e0-be3d-fc415140785b</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am sorry for the delay.&lt;/p&gt;
&lt;p&gt;It looks like the difference then is whether you use a relative or an absolute path. I suspect that this may be an issue with using Windows Subsystem for Linux in combination with the Windows version of nrfjprog (.exe). Have you tried the Linux version of &lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Command-Line-Tools"&gt;nRF Command Line Tools&lt;/a&gt;, when you run it from WSL?&lt;/p&gt;
&lt;p&gt;Also what version of nrfjprog is this? Have you tried with the latest version?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about path to hex file when using nrfjprog utility</title><link>https://devzone.nordicsemi.com/thread/292959?ContentTypeID=1</link><pubDate>Thu, 04 Feb 2021 14:57:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96678d30-0b4c-4953-a62c-5131d6f3f65e</guid><dc:creator>Gudni</dc:creator><description>&lt;p&gt;Here it is:&lt;/p&gt;
&lt;p&gt;I have tried:&lt;/p&gt;
&lt;p&gt;1. Removing space from file path. It does not resolve the issue&lt;/p&gt;
&lt;p&gt;2. Moved the &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;.hex&lt;/span&gt; file to the top directory on my machine. &amp;quot;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;/mnt/c/hexfile.hex&lt;/span&gt;&amp;quot;. It does not resolve the issue.&lt;/p&gt;
&lt;p&gt;3. Executing the nrfjprog command directly in the terminal. It does not resolve the issue so I doubt if this issue can be traced back to my CMake setup.&lt;/p&gt;
&lt;p&gt;When I look at the log.log below and compare it to a log where the command works I see the first discrepancy is this line: &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;[debug] [ nRF0x0] - is_bprot_enabled&lt;/span&gt; does not appear for the failing command and instead I see &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;[debug] [ nRF0x0] - close_dll&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1614.log.log"&gt;devzone.nordicsemi.com/.../1614.log.log&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about path to hex file when using nrfjprog utility</title><link>https://devzone.nordicsemi.com/thread/292908?ContentTypeID=1</link><pubDate>Thu, 04 Feb 2021 13:03:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:453dc5a9-5401-4931-b5c0-a2d6eee5ca71</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Something is obviously wrong, and although you have found a workaround it is not fully clear what and where the issue lies. It can be nrfjprog or it can be the system, and it can be the path length, or the space in the file name, or the use of absolute path, or something else.&lt;/p&gt;
&lt;p&gt;Can you run the (failing) nrfjprog command with the &lt;code&gt;--log&lt;/code&gt; flag added, and provide the resulting log.log file?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>