<?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>nRF Connect VSCode plugin flashing on nRF5340 not working with runner jlink or nrfutil</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111104/nrf-connect-vscode-plugin-flashing-on-nrf5340-not-working-with-runner-jlink-or-nrfutil</link><description>I don&amp;#39;t want to use nrfjprog as the runner. I want to use jlink runner when flashing. However it doesn&amp;#39;t work, neither do nrfutil. 
 nRF Connect for VSCode doesn&amp;#39;t work when runner is NOT nrfjprog with nRF5340. Neither using nrfutil or jlink as runner</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 13 Aug 2024 04:52:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111104/nrf-connect-vscode-plugin-flashing-on-nrf5340-not-working-with-runner-jlink-or-nrfutil" /><item><title>RE: nRF Connect VSCode plugin flashing on nRF5340 not working with runner jlink or nrfutil</title><link>https://devzone.nordicsemi.com/thread/497915?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2024 04:52:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6f03a0a-e7ee-4c16-8a8a-1bf2eb5eb4b1</guid><dc:creator>fnfweek</dc:creator><description>&lt;p&gt;Great answer, thank you so much.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ffffff;" data-sheets-root="1"&gt;&lt;a class="in-cell-link" style="color:#ffffff;" href="https://dinogameoffline.io/" rel="noopener noreferrer" target="_blank"&gt;Dino Game Offline&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect VSCode plugin flashing on nRF5340 not working with runner jlink or nrfutil</title><link>https://devzone.nordicsemi.com/thread/483360?ContentTypeID=1</link><pubDate>Tue, 14 May 2024 20:12:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:353381f9-6eb5-41a4-ab35-af39c746b51c</guid><dc:creator>jakkra</dc:creator><description>&lt;p&gt;Yes this I&amp;#39;m aware of. Experimented with JLink, and doing an erase and then program&amp;nbsp;using JLink takes:&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;pre class="ui-code" data-mode="text"&gt;time /opt/SEGGER/JLink_V788k/JLinkExe -nogui 1 -if swd -speed 4000 -device nrf5340_xxaa_app -CommanderScript jlink_erase -nogui 1 &amp;amp;&amp;amp; time /opt/SEGGER/JLink_V788k/JLinkExe -nogui 1 -if swd -speed 4000 -device nrf5340_xxaa_app -CommanderScript jlink_file_flash -nogui 1&lt;/pre&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;0m1,393s(erase) +&amp;nbsp; 0m8,581s(program+verify) = ~10s&lt;/p&gt;
&lt;p&gt;Vs.&lt;/p&gt;
&lt;p&gt;time nrfjprog --program app/build_debug/zephyr/merged.hex --chiperase --verify&lt;/p&gt;
&lt;p&gt;real&amp;nbsp; &amp;nbsp; 0m21,907s&lt;/p&gt;
&lt;p&gt;So there are defenately room for improvement by getting the jlink runner functional for nRF53.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll file a bug into Zephyr instead for getting jlink runner functional, and hopefully I get some time myself to fix this.&lt;/p&gt;
&lt;p&gt;You can close this ticket, thank you &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect VSCode plugin flashing on nRF5340 not working with runner jlink or nrfutil</title><link>https://devzone.nordicsemi.com/thread/483296?ContentTypeID=1</link><pubDate>Tue, 14 May 2024 13:08:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a8a548b-55c5-465b-9015-2c07eb9248fb</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The main culprit when using nrfjprog as runner is the erase type that west uses as default, which is --sectoranduicrerase for the nRF52 device family and --sectorerase for other device families. Here you can see the time it takes to program the Matter light bulb sample on the nRF52840 DK using nrfjprog directly with sectoranduicrerase:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;~/ncs/nrf/samples/matter/light_bulb/build/zephyr$ time nrfjprog --program merged.hex --sectoranduicrerase --verify
[ #################### ]  22.069s | Erase file - Done erasing                                                          
[ #################### ]  10.054s | Program file - Done programming                                                    
[ #################### ]   9.856s | Verify file - Done verifying                                                       

real	0m43,825s
user	0m0,943s
sys	0m1,267s
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If you use west --erase instead of west, it will use the --chiperase flag, which should reduce the time:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;~/ncs/nrf/samples/matter/light_bulb/build/zephyr$ time nrfjprog --program merged.hex --chiperase --verify
[ #################### ]   0.207s | Erase file - Done erasing                                                          
[ #################### ]  10.052s | Program file - Done programming                                                    
[ #################### ]   9.856s | Verify file - Done verifying                                                       

real	0m21,863s
user	0m0,522s
sys	0m1,067s&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;~/ncs/nrf/samples/matter/light_bulb/build$ time west flash --skip-rebuild --erase
-- west flash: using runner nrfjprog
-- runners.nrfjprog: mass erase requested
-- runners.nrfjprog: reset after flashing requested
Using board 683635785
-- runners.nrfjprog: Flashing file: /home/marte/ncs/nrf/samples/matter/light_bulb/build/zephyr/merged.hex
[ #################### ]   0.206s | Erase file - Done erasing                                                          
[ #################### ]  10.051s | Program file - Done programming                                                    
[ #################### ]   9.852s | Verify file - Done verifying                                                       
Enabling pin reset.
Applying pin reset.
-- runners.nrfjprog: Board with serial number 683635785 flashed successfully.

real	0m25,646s
user	0m1,637s
sys	0m3,439s
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It is still not as good as jlink, but it is an improvement.&lt;/p&gt;
&lt;p&gt;Using --erase is the same as the &amp;#39;Erase and Flash to Board&amp;#39; action in the vscode extension:&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/pastedimage1715692045917v1.png" alt=" " /&gt; &lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect VSCode plugin flashing on nRF5340 not working with runner jlink or nrfutil</title><link>https://devzone.nordicsemi.com/thread/483214?ContentTypeID=1</link><pubDate>Tue, 14 May 2024 10:33:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a2cbfa2-b96d-4276-a599-419e16667bf4</guid><dc:creator>jakkra</dc:creator><description>&lt;p&gt;I understand that, however you should look into why nrfjprog is so much slower than jlink to flash. Since Nordic customers will reflash their FW ALOT, saving a few seconds each time makes a huge difference in the user experience.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect VSCode plugin flashing on nRF5340 not working with runner jlink or nrfutil</title><link>https://devzone.nordicsemi.com/thread/483211?ContentTypeID=1</link><pubDate>Tue, 14 May 2024 10:18:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4eabe7d-d8df-41d7-9082-f8144b3b9005</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for clarifying.&lt;/p&gt;
&lt;p&gt;The only option I see for using JLink is to modify the script to handle multiple cores. Since we recommend using nrfjprog, and this works, we can unfortunately not prioritize resources for this at the moment.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect VSCode plugin flashing on nRF5340 not working with runner jlink or nrfutil</title><link>https://devzone.nordicsemi.com/thread/483092?ContentTypeID=1</link><pubDate>Mon, 13 May 2024 14:15:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:deb3393a-fba3-4be4-895b-ed041e8d2ad1</guid><dc:creator>jakkra</dc:creator><description>&lt;p&gt;Hi and thank you. I fixed the issue with nrfutil of you check me last comment.&lt;/p&gt;
&lt;p&gt;2 Reasons I want to use JLink Runner:&lt;/p&gt;
&lt;p&gt;1. I want to use jlink runner is because it&amp;#39;s alot faster.&lt;/p&gt;
&lt;p&gt;jlink:&amp;nbsp;0m25,406s (NOTE excluding net core, looking at nrfjprog log, it takes about 10s for net core, so add that here then). So let&amp;#39;s say JLINK is 35s, so pretty much half time of the other two.&lt;/p&gt;
&lt;p&gt;nrfutil:&amp;nbsp;1m12,801s&lt;/p&gt;
&lt;p&gt;nrfjprog:&amp;nbsp;1m18,912s&lt;/p&gt;
&lt;p&gt;Full log from all of them:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;jlink:
jakkra@jakkra-XPS-15-9560:~/Documents/project$ time west flash -d /home/jakkra/Documents/project/app/build_debug_v5_rtt --skip-rebuild -i 760208501
-- west flash: using runner jlink
-- runners.jlink: JLink version: 7.88k
-- runners.jlink: Flashing file: /home/jakkra/Documents/project/app/build_debug_v5_rtt/zephyr/merged.hex
Downloading file [/home/jakkra/Documents/project/app/build_debug_v5_rtt/zephyr/merged.hex]...
Comparing flash   [100%] Done.
Erasing flash     [100%] Done.
Programming flash [100%] Done.
J-Link: Flash download: Bank 2 @ 0x00000000: 5 ranges affected (790528 bytes)
J-Link: Flash download: Total: 24.172s (Prepare: 0.118s, Compare: 0.223s, Erase: 16.617s, Program &amp;amp; Verify: 7.120s, Restore: 0.093s)
J-Link: Flash download: Program &amp;amp; Verify speed: 108 KB/s
O.K.
J-Link&amp;gt;g
J-Link&amp;gt;writeDP 1 0
Writing DP register 1 = 0x00000000 (0 write repetitions needed)
J-Link&amp;gt;readDP 1
Reading DP register 1 = 0x00000040 (0 read repetitions needed)
J-Link&amp;gt;q

Script processing completed.


real    0m25,406s
user    0m1,141s
sys     0m1,548s

nrfutil:
jakkra@jakkra-XPS-15-9560:~/Documents/dproject$ time west flash -d /home/jakkra/Documents/dproject/app/build_debug_v5_rtt --skip-rebuild -i 760208501
-- west flash: using runner nrfutil
-- runners.nrfutil: reset after flashing requested
-- runners.nrfutil: Flashing file: /home/jakkra/Documents/dproject/app/build_debug_v5_rtt/zephyr/merged_domains.hex
-- runners.nrfutil: /home/jakkra/Documents/dproject/app/build_debug_v5_rtt/zephyr/merged_domains.hex targets both nRF53 coprocessors; splitting it into: /home/jakkra/Documents/dproject/app/build_debug_v5_rtt/zephyr/GENERATED_CP_NETWORK_merged_domains.hex and /home/jakkra/Documents/dproject/app/build_debug_v5_rtt/zephyr/GENERATED_CP_APPLICATION_merged_domains.hex
-- runners.nrfutil: Upload image.
-- runners.nrfutil: Upload image.
-- runners.nrfutil: Started
-- runners.nrfutil: Board with serial number 760208501 flashed successfully.

real    1m12,801s
user    0m7,425s
sys     0m5,426s

nrfjprog:
jakkra@jakkra-XPS-15-9560:~/Documents/dproject$ time west flash -d /home/jakkra/Documents/dproject/app/build_debug_v5_rtt --skip-rebuild -i 760208501
-- west flash: using runner nrfjprog
-- runners.nrfjprog: reset after flashing requested
-- runners.nrfjprog: Flashing file: /home/jakkra/Documents/dproject/app/build_debug_v5_rtt/zephyr/merged_domains.hex
-- runners.nrfjprog: /home/jakkra/Documents/dproject/app/build_debug_v5_rtt/zephyr/merged_domains.hex targets both nRF53 coprocessors; splitting it into: /home/jakkra/Documents/dproject/app/build_debug_v5_rtt/zephyr/GENERATED_CP_NETWORK_merged_domains.hex and /home/jakkra/Documents/dproject/app/build_debug_v5_rtt/zephyr/GENERATED_CP_APPLICATION_merged_domains.hex
[ #################### ]  10.910s | Erase file - Done erasing                                                          
[ #################### ]   1.497s | Program file - Done programming                                                    
[ #################### ]   1.477s | Verify file - Done verifying                                                       
[ #################### ]  39.834s | Erase file - Done erasing                                                          
[ #################### ]   8.724s | Program file - Done programming                                                    
[ #################### ]   8.654s | Verify file - Done verifying                                                       
Applying pin reset.
-- runners.nrfjprog: Board with serial number 760208501 flashed successfully.

real    1m18,912s
user    0m6,498s
sys     0m5,105s&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;2. I quite often have issues where it randomly&amp;nbsp;get into a state where I need to recover my board when developing. I don&amp;#39;t have reset line connected, hence always doing softreset. I&amp;#39;m also most of the time doing a full chip erase when flashing to save time. This is the reason I wanted to try using JLink instead to see if this issue goes away.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But anyway, thanks for checking. I&amp;#39;ll try to patch Zephyr so it works for me using JLink. Thanks for the help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect VSCode plugin flashing on nRF5340 not working with runner jlink or nrfutil</title><link>https://devzone.nordicsemi.com/thread/483019?ContentTypeID=1</link><pubDate>Mon, 13 May 2024 11:53:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f78bf2b-d0ae-4cef-9812-484e217db706</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is there a particular reason you want to use the jlink runner instead of nrfjprog?&lt;/p&gt;
&lt;p&gt;Using nrfutil as runner worked out of the box when I tested the Peripheral LBS sample in nRF Connect SDK v2.6.1, so I do not know why you get the error regarding execute-batch.&lt;/p&gt;
&lt;p&gt;The script for the jlink runner does not use the NrfBinaryRunner class from nrf_common.py. In nrf_common.py, the merged_domains.hex file is split into two separate files that are programmed to each core separately by program_hex_nrf53():&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;-- runners.nrfjprog: Flashing file: /home/mamy/ncs/nrf/samples/bluetooth/peripheral_lbs/build/zephyr/merged_domains.hex
-- runners.nrfjprog: /home/mamy/ncs/nrf/samples/bluetooth/peripheral_lbs/build/zephyr/merged_domains.hex targets both nRF53 coprocessors; splitting it into: /home/mamy/ncs/nrf/samples/bluetooth/peripheral_lbs/build/zephyr/GENERATED_CP_NETWORK_merged_domains.hex and /home/mamy/ncs/nrf/samples/bluetooth/peripheral_lbs/build/zephyr/GENERATED_CP_APPLICATION_merged_domains.hex&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;-- runners.nrfutil: Flashing file: /home/mamy/ncs/nrf/samples/bluetooth/peripheral_lbs/build/zephyr/merged_domains.hex
-- runners.nrfutil: /home/mamy/ncs/nrf/samples/bluetooth/peripheral_lbs/build/zephyr/merged_domains.hex targets both nRF53 coprocessors; splitting it into: /home/mamy/ncs/nrf/samples/bluetooth/peripheral_lbs/build/zephyr/GENERATED_CP_NETWORK_merged_domains.hex and /home/mamy/ncs/nrf/samples/bluetooth/peripheral_lbs/build/zephyr/GENERATED_CP_APPLICATION_merged_domains.hex&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The jlink runner does not have a way to handle the two cores, which causes it to fail when flashing applications for both cores.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect VSCode plugin flashing on nRF5340 not working with runner jlink or nrfutil</title><link>https://devzone.nordicsemi.com/thread/482909?ContentTypeID=1</link><pubDate>Sun, 12 May 2024 13:56:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6bc0b3a4-b562-4247-bc44-5e397ff051ed</guid><dc:creator>jakkra</dc:creator><description>&lt;p&gt;Ok, after some debugging/searching I found the fix in upstream Zephyr for the nrfutil flashing&amp;nbsp;&lt;a id="" href="https://github.com/zephyrproject-rtos/zephyr/commit/0387214bfcafa30e11f8b4d11889f8b55a998fff"&gt;https://github.com/zephyrproject-rtos/zephyr/commit/0387214bfcafa30e11f8b4d11889f8b55a998fff&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Anyway, I want to use jlink and it doesn&amp;#39;t work.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>