<?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>Failed to flash with nRF Connect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119738/failed-to-flash-with-nrf-connect</link><description>Hello. 
 Thank you very much for releasing nRF Connect SDK v3.0.0-preview1. 
 I quickly tried the sample program, and while the build was successful, I encountered an issue with the flash operation. The error is as follows: 
 
 In the &amp;quot;jlink.py&amp;quot; file</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 Mar 2025 00:01:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119738/failed-to-flash-with-nrf-connect" /><item><title>RE: Failed to flash with nRF Connect</title><link>https://devzone.nordicsemi.com/thread/527489?ContentTypeID=1</link><pubDate>Mon, 17 Mar 2025 00:01:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:054deacc-f53a-4379-89b4-36ecd56c1a3b</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/introiboad"&gt;Carles&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;I have confirmed that the issue has been resolved with the revised file.&lt;/p&gt;
&lt;p&gt;Thank you for your support.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;a.da&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to flash with nRF Connect</title><link>https://devzone.nordicsemi.com/thread/527488?ContentTypeID=1</link><pubDate>Mon, 17 Mar 2025 00:01:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abbf7616-862a-4d01-a5b8-73be5e17a081</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;Yes, nRF5340DK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to flash with nRF Connect</title><link>https://devzone.nordicsemi.com/thread/527469?ContentTypeID=1</link><pubDate>Sat, 15 Mar 2025 17:29:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0677b1a-c8d6-49ac-ab76-aadfecf97135</guid><dc:creator>Carles</dc:creator><description>&lt;p&gt;That is almost definitely a false positive, provided those files came from the toolchain installed via VS Code or nrfutil.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to flash with nRF Connect</title><link>https://devzone.nordicsemi.com/thread/527430?ContentTypeID=1</link><pubDate>Fri, 14 Mar 2025 18:09:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd21d9b4-45e1-4dae-ab5b-9eeb4312fc54</guid><dc:creator>Carles</dc:creator><description>&lt;p&gt;Hey &lt;a href="https://devzone.nordicsemi.com/members/a.da"&gt;a.da&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;I finally figured out what the issue is. Turns out that VS Code filters out the `&lt;span&gt;ProgramFiles(x86)` env var, so I instead rewrote the logic to use the registry instead of env vars, and to only execute when you are actually using the&amp;nbsp; jlink runner. This fix will be in NCS 3.0.0.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In the meantime, this is the PR:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/pull/87136"&gt;github.com/.../87136&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to flash with nRF Connect</title><link>https://devzone.nordicsemi.com/thread/527338?ContentTypeID=1</link><pubDate>Fri, 14 Mar 2025 09:02:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c000a62-48a2-4fdb-a0e3-32b6d0d4b9a5</guid><dc:creator>Carles</dc:creator><description>&lt;p&gt;Thanks for the info. I assume you are building for the nRF5340 DK, correct?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to flash with nRF Connect</title><link>https://devzone.nordicsemi.com/thread/527284?ContentTypeID=1</link><pubDate>Thu, 13 Mar 2025 23:51:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6cbf7a9-27f9-4fe3-9af9-ecfc5047b231</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/introiboad"&gt;Carles&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I just pressed the Flash button in VS Code, but is there anything suspicious about the operation?&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/250314_5F00_vscode.png" /&gt;&lt;/p&gt;
&lt;p&gt;The contents of the &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;quot;board.cmake&amp;quot;&lt;/span&gt; file are as follows.&amp;nbsp;It&amp;#39;s the same as the file included in sdk-zephyr.&lt;br /&gt;Since I only flashed the sample program to the DK, there are no custom files of my own.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# SPDX-License-Identifier: Apache-2.0

if(CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP_NS)
  set(TFM_PUBLIC_KEY_FORMAT &amp;quot;full&amp;quot;)
endif()

if(CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP OR CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP_NS)
board_runner_args(jlink &amp;quot;--device=nrf5340_xxaa_app&amp;quot; &amp;quot;--speed=4000&amp;quot;)
endif()

if(CONFIG_TFM_FLASH_MERGED_BINARY)
  set_property(TARGET runners_yaml_props_target PROPERTY hex_file tfm_merged.hex)
endif()

if(CONFIG_BOARD_NRF5340DK_NRF5340_CPUNET)
board_runner_args(jlink &amp;quot;--device=nrf5340_xxaa_net&amp;quot; &amp;quot;--speed=4000&amp;quot;)
endif()

include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;a.da&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to flash with nRF Connect</title><link>https://devzone.nordicsemi.com/thread/527235?ContentTypeID=1</link><pubDate>Thu, 13 Mar 2025 15:44:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00c6da8b-9575-4c4b-9a2a-654d411e7175</guid><dc:creator>Carles</dc:creator><description>&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/a.da"&gt;a.da&lt;/a&gt;&amp;nbsp;Why are you flashing with the jlink backend though? Could you show me the contents of your `board.cmake` file please?&lt;/p&gt;
&lt;p&gt;or were you trying to debug instead?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to flash with nRF Connect</title><link>https://devzone.nordicsemi.com/thread/527060?ContentTypeID=1</link><pubDate>Wed, 12 Mar 2025 23:50:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f29802f6-71d8-4350-b22f-6d3b8ba4f09d</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;Hi Einar, thanks for your reply.&lt;/p&gt;
&lt;p&gt;Thanks to the workaround, Flash was successful. I look forward to the follow-up.&lt;/p&gt;
[quote userid="7377" url="~/f/nordic-q-a/119738/failed-to-flash-with-nrf-connect/526869"]Regarding the false positivies, which security software is reporting it?[/quote]
&lt;p&gt;It is a McAfee.&lt;br /&gt;About Main Software:&lt;br /&gt;Version: 1.26.217&lt;br /&gt;Release: 16.0 R126&lt;br /&gt;About Antivirus Component:&lt;br /&gt;Build: 1.126.268.0&lt;br /&gt;Content Version: 2077.0&lt;/p&gt;
&lt;p&gt;It was detected by real-time scanning during the build process. &lt;br /&gt;By adding it to the &amp;quot;Exclude Files&amp;quot; list, the build was able to complete successfully.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;a.da&lt;/p&gt;
&lt;p&gt;Addition:&lt;/p&gt;
&lt;p&gt;It seems that the false detection is due to an update in the security software.&lt;br /&gt;Not only the SDK Toolchain v3.0.0-preview1, but also the same file in v2.9.0 is now being flagged.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to flash with nRF Connect</title><link>https://devzone.nordicsemi.com/thread/526869?ContentTypeID=1</link><pubDate>Wed, 12 Mar 2025 09:27:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa30ae94-7c68-4611-a0ca-c23a02e75801</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for reporting the issue. We are looking into it. A suggested workaround for now is to&amp;nbsp;replace line 32 in&amp;nbsp;zephyr/scripts/west_commands/runners/jlink.py so that it looks like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="python"&gt;    for root in [os.environ.get(&amp;quot;ProgramFiles&amp;quot;, &amp;quot;&amp;quot;), os.environ.get(&amp;quot;ProgramFiles(x86)&amp;quot;, &amp;quot;&amp;quot;), str(Path.home())]:&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Regarding the false positivies, which security software is reporting it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>