<?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>VSCode: replicating build configurations (preset bugs + command line)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91499/vscode-replicating-build-configurations-preset-bugs-command-line</link><description>OS: Windows 
 NCS Version: v2.0.2 Installed using toolchain manager 
 IDE: VSCode 1.70.2 + nordic-semiconductor.nrf-connect-extension-pack 2022.5.1 
 
 I have applications created as &amp;quot;freestanding&amp;quot; e.g. 
 
 and these work well. I have found the bit about</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 Sep 2022 08:38:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91499/vscode-replicating-build-configurations-preset-bugs-command-line" /><item><title>RE: VSCode: replicating build configurations (preset bugs + command line)</title><link>https://devzone.nordicsemi.com/thread/387834?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 08:38:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9090510-8f06-4a2b-a61c-2ba7e587151a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Sorry for the late reply. I was out of office for the last couple of weeks. This is indeed a good place to report bugs/issues. I have forwarded your input to our nRF Connect SDK team. If I receive a direct reply, I will update this ticket as well.&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: VSCode: replicating build configurations (preset bugs + command line)</title><link>https://devzone.nordicsemi.com/thread/384923?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2022 06:52:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3244107-af43-4135-82e2-390ca8c0a9df</guid><dc:creator>crzyrndm</dc:creator><description>&lt;p&gt;Is this the best place to be reporting bugs/issues with NCS? Even with the shell environment established, there&amp;#39;s still a few things I&amp;#39;d rather like to see improved in the experience&lt;/p&gt;
[quote userid="118950" url="~/f/nordic-q-a/91499/vscode-replicating-build-configurations-preset-bugs-command-line"]&lt;p&gt;First Issue: Creating a build configuration from the defined CMakePresets ignores the &amp;quot;binaryDir&amp;quot; field (build directory is always default). It is saved from the UI &amp;quot;Save Configuration&amp;quot;, just not loaded&lt;/p&gt;
&lt;p&gt;1a) The UI doesn&amp;#39;t allow the build directory to be nested inside a folder (e.g. &amp;quot; ${sourceDir}/build/${presetName}&amp;quot;) which really helps keep things tidy when multiple configurations are needed IMO&lt;/p&gt;[/quote]
&lt;p&gt;^^ are both a real annoyance particularly when bringing new people into a project.&lt;/p&gt;
&lt;p&gt;Documentation around setting up the shell environment seems to be completely missing (I still can&amp;#39;t find anything even now I know what to be searching for)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VSCode: replicating build configurations (preset bugs + command line)</title><link>https://devzone.nordicsemi.com/thread/384915?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2022 06:42:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5fd3111-4a99-4ba0-95e6-b7905edef52b</guid><dc:creator>crzyrndm</dc:creator><description>&lt;p&gt;I can confirm after following through &amp;quot;toolchain/environment.json&amp;quot; that I can recreate the environment and build an image from a fresh shell.&amp;nbsp;&lt;pre class="ui-code" data-mode="powershell"&gt;# Zephyr install root
$Env:ZEPHYR_BASE = &amp;quot;&amp;lt;ncs install directory&amp;gt;/v2.0.2/zephyr&amp;quot;

# Toolchain setup
$toolchain = &amp;quot;&amp;lt;ncs install directory&amp;gt;/toolchains/v2.0.2&amp;quot;

## overwrite ZEPHYR_SDK_INSTALL_DIR
$Env:ZEPHYR_SDK_INSTALL_DIR = &amp;quot;$toolchain/opt/zephyr-sdk&amp;quot;

## overwrite PYTHONPATH with values from environment.json
$pythonPathValues = @(
	&amp;quot;$toolchain/opt/bin&amp;quot;,
	&amp;quot;$toolchain/opt/bin/Lib&amp;quot;,
	&amp;quot;$toolchain/opt/bin/Lib/site-packages&amp;quot;
)
$pythonPath = $pythonPathValues -join &amp;quot;;&amp;quot;
$Env:PYTHONPATH = $pythonPath

## Prepend PATH with values from environment.json
$pathValues = @(
	&amp;quot;$toolchain/.&amp;quot;,
	&amp;quot;$toolchain/mingw64/bin&amp;quot;,
	&amp;quot;$toolchain/bin&amp;quot;,
	&amp;quot;$toolchain/opt/bin&amp;quot;,
	&amp;quot;$toolchain/opt/bin/Scripts&amp;quot;,
	&amp;quot;$toolchain/nanopb/generator-bin&amp;quot;,
	&amp;quot;$toolchain/opt/zephyr-sdk/arm-zephyr-eabi/bin&amp;quot;
)
$prepPath = $pathValues -join &amp;quot;;&amp;quot;
$Env:PATH = $prepPath + &amp;#39;;&amp;#39; + $Env:PATH&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;For anyone finding this at a later date ^^ is the script for NCS v2.0.2 (in powershell, adapt as required. What&amp;#39;s happening should be fairly obvious)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VSCode: replicating build configurations (preset bugs + command line)</title><link>https://devzone.nordicsemi.com/thread/384871?ContentTypeID=1</link><pubDate>Tue, 06 Sep 2022 21:44:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:954ce596-3926-40e1-aa8b-5a1c47d2ca67</guid><dc:creator>Edvin</dc:creator><description>[quote user="crzyrndm"]There&amp;#39;s clearly something more than the ZEPHYR_BASE environment variable being set[/quote]
&lt;p&gt;Indeed.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In NCS V1.9.1 and older, there was a .cmd file that you could run (add it to your environment path, and run it from the command line). It was located in e.g. ncs\toolchain\cmd\env.cmd (NB: v1.9.1 and older).&lt;/p&gt;
&lt;p&gt;There is also another file that does something similar, but with some limitations. However, for just building samples it should work. It is found in:&lt;/p&gt;
&lt;p&gt;ncs\zephyr\zephyr-env.cmd&lt;/p&gt;
&lt;p&gt;Also in the later versions.&lt;/p&gt;
&lt;p&gt;The env.cmd file that disappeared in v2.0.0 is replaced by some other magic that is ran when you open the CL from nRF Connect for Desktop -&amp;gt; Toolchain Manager. I believe it is some java script running. What I know is that it uses the information stored in the file:&lt;/p&gt;
&lt;p&gt;ncs\..\toolchains\v2.0.0\environment.json&lt;/p&gt;
&lt;p&gt;(the toolchain folder is at the same level as the ncs root folder).&lt;/p&gt;
&lt;p&gt;Perhaps you can use the information in there to set up the CL in order to build if the file found in ncs\zephyr\zephyr-env.cmd is not enough.&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: VSCode: replicating build configurations (preset bugs + command line)</title><link>https://devzone.nordicsemi.com/thread/384672?ContentTypeID=1</link><pubDate>Tue, 06 Sep 2022 01:46:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ec9a073-5ab5-40bd-9fca-98dcf18dccde</guid><dc:creator>crzyrndm</dc:creator><description>&lt;p&gt;That worked exactly as expected so the question then becomes, how do I recreate the nRF command prompt environment for automated CI builds? There&amp;#39;s clearly something more than the ZEPHYR_BASE environment variable being set&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VSCode: replicating build configurations (preset bugs + command line)</title><link>https://devzone.nordicsemi.com/thread/384538?ContentTypeID=1</link><pubDate>Mon, 05 Sep 2022 10:38:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd486469-ecc1-4bf8-aff7-90f6b76a3dcb</guid><dc:creator>Edvin</dc:creator><description>[quote user="crzyrndm"]Some sort of verification action seems like it would be useful[/quote]
&lt;p&gt;Tell me about it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So I downloaded and tested the NCS v2.0.2 now. I am able to build the samples using the command &amp;quot;west build -b nrf52840dk_nrf52840 -d build&amp;quot;.&lt;/p&gt;
&lt;p&gt;Remember that you need to open the command line using nRF Connect for Desktop -&amp;gt; Toolchain Manager -&amp;gt;&amp;nbsp; &amp;quot;Open command prompt&amp;quot;&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/pastedimage1662374256897v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you do that, and try to build e.g. the ncs\nrf\samples\bluetooth\peripheral_uart sample using&amp;nbsp;&lt;/p&gt;
&lt;p&gt;west build -b nrf52840dk_nrf52840 -d build&lt;/p&gt;
&lt;p&gt;what does it say?&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: VSCode: replicating build configurations (preset bugs + command line)</title><link>https://devzone.nordicsemi.com/thread/384217?ContentTypeID=1</link><pubDate>Wed, 31 Aug 2022 21:05:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d10f1ad8-82ec-4998-99c5-aaaa355dcd5e</guid><dc:creator>crzyrndm</dc:creator><description>&lt;p&gt;I was using the toolchain manager to install 2.0.2&lt;/p&gt;
&lt;p&gt;Reinstalled: still getting the exact same error on command line (VSCode extension builds fine)&lt;/p&gt;
&lt;p&gt;The only potential errors I&amp;#39;m seeing in the log file look like this&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;2022-08-31T20:34:03.046Z DEBUG --- zephyr: initializing
2022-08-31T20:34:03.054Z DEBUG west.manifest: running &amp;#39;git init &amp;#39;C:\git\ncs\v2.0.2\zephyr&amp;#39;&amp;#39; in C:\git\ncs\v2.0.2
2022-08-31T20:34:03.077Z DEBUG Initialized empty Git repository in C:/git/ncs/v2.0.2/zephyr/.git/
west.manifest: &amp;quot;git init &amp;#39;C:\git\ncs\v2.0.2\zephyr&amp;#39;&amp;quot; exit code: 0 stdout: None stderr: None
west.manifest: running &amp;#39;git remote add -- ncs https://github.com/nrfconnect/sdk-zephyr&amp;#39; in C:\git\ncs\v2.0.2\zephyr
2022-08-31T20:34:03.088Z DEBUG west.manifest: &amp;quot;git remote add -- ncs https://github.com/nrfconnect/sdk-zephyr&amp;quot; exit code: 0 stdout: None stderr: None
2022-08-31T20:34:03.089Z DEBUG west.manifest: running &amp;#39;git cat-file -t v3.0.99-ncs1-1&amp;#39; in C:\git\ncs\v2.0.2\zephyr
2022-08-31T20:34:03.099Z DEBUG west.manifest: &amp;quot;git cat-file -t v3.0.99-ncs1-1&amp;quot; exit code: 128 stdout: b&amp;#39;&amp;#39; stderr: b&amp;#39;fatal: Not a valid object name v3.0.99-ncs1-1\n&amp;#39;
2022-08-31T20:34:03.099Z DEBUG --- zephyr: fetching, need revision v3.0.99-ncs1-1
west.manifest: running &amp;#39;git fetch -f --tags -- https://github.com/nrfconnect/sdk-zephyr v3.0.99-ncs1-1&amp;#39; in C:\git\ncs\v2.0.2\zephyr
2022-08-31T20:35:42.125Z DEBUG From https://github.com/nrfconnect/sdk-zephyr&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The package installation toward the end of the log looks fairly normal from what I know&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;2022-08-31T20:41:42.582Z DEBUG ZEPHYR_BASE=C:\git\ncs\v2.0.2\zephyr (origin: configfile)
2022-08-31T20:41:42.603Z DEBUG cmake version 3.20.5 is OK; minimum version is 3.13.1
Running CMake: &amp;#39;C:\git\ncs\toolchains\v2.0.2\opt\bin\cmake.EXE&amp;#39; -P &amp;#39;C:\git\ncs\v2.0.2\zephyr\share\zephyr-package\cmake\zephyr_export.cmake&amp;#39;
2022-08-31T20:41:42.643Z DEBUG Zephyr (C:/git/ncs/v2.0.2/zephyr/share/zephyr-package/cmake)
has been added to the user package registry in:
HKEY_CURRENT_USER\Software\Kitware\CMake\Packages\Zephyr
2022-08-31T20:41:42.660Z DEBUG cmake version 3.20.5 is OK; minimum version is 3.13.1
Running CMake: &amp;#39;C:\git\ncs\toolchains\v2.0.2\opt\bin\cmake.EXE&amp;#39; -P &amp;#39;C:\git\ncs\v2.0.2\zephyr\share\zephyrunittest-package\cmake\zephyr_export.cmake&amp;#39;
2022-08-31T20:41:42.700Z DEBUG ZephyrUnittest (C:/git/ncs/v2.0.2/zephyr/share/zephyrunittest-package/cmake)
has been added to the user package registry in:
HKEY_CURRENT_USER\Software\Kitware\CMake\Packages\ZephyrUnittest&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Examining the v2.0.2/zephyr folder in git it is checked out at the tag v3.0.99-ncs1-1&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;be360e7 - [nrf fromtree] net: openthread: enable default software tx security in 1.3&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;RE: Silent failures - Some sort of verification action seems like it would be useful&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VSCode: replicating build configurations (preset bugs + command line)</title><link>https://devzone.nordicsemi.com/thread/384140?ContentTypeID=1</link><pubDate>Wed, 31 Aug 2022 12:30:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfd81805-d810-4142-8a7c-5a4cefebc7e3</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Did you try using the &lt;a href="https://www.nordicsemi.com/Products/Development-tools/nrf-connect-for-desktop"&gt;nRF Connect for Desktop&lt;/a&gt; -&amp;gt; Toolchain manager&lt;/p&gt;
&lt;p&gt;to set up your NCS install? If you didn&amp;#39;t, I highly recommend that you give it a go.&lt;/p&gt;
&lt;p&gt;It looks like there is a thing or two that is not currently correctly set up on your end.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you did try to set it up with the toolchain manager, then please be aware that from time to time, it fails silently. Try removing your v2.0.2 folder, and try again.&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>