<?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: How to build from command line after doing automatic install</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92651/nrf-connect-how-to-build-from-command-line-after-doing-automatic-install</link><description>I followed the instructions to install the nRF Connect SDK using the automatic method: 
 http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_assistant.html 
 That worked and I was able to build sample applications and run them on the DK</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 16 Feb 2024 00:53:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92651/nrf-connect-how-to-build-from-command-line-after-doing-automatic-install" /><item><title>RE: nRF Connect: How to build from command line after doing automatic install</title><link>https://devzone.nordicsemi.com/thread/469139?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2024 00:53:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83239f64-d17a-4d0d-b766-247c86c0ae38</guid><dc:creator>liteyear</dc:creator><description>&lt;p&gt;OMG, what a mission. Here&amp;#39;s what worked for me on macOS, based on your excellent suggestion:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I couldn&amp;#39;t find nrfutil anywhere&amp;nbsp;on my system despite much searching, so I downloaded it fresh from&amp;nbsp;&lt;a id="" href="https://www.nordicsemi.com/Products/Development-tools/nrf-util"&gt;https://www.nordicsemi.com/Products/Development-tools/nrf-util&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;It just comes as a binary, so then I put it on my path with:&amp;nbsp;&amp;nbsp;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;sudo mv ~/Downloads/nrfutil /usr/local/bin/&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;And made it executable:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;sudo chmod 755 /usr/local/bin/nrfutil&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;And then worked around the developer signing issue by opening&amp;nbsp;the folder in&amp;nbsp;Finder with &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;open /usr/local/bin&lt;/span&gt; , right-clicking the file, selecting &amp;quot;Open&amp;quot;, and approving the unverified executable.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;I still couldn&amp;#39;t run the command until I&amp;nbsp;installed toolchain manager with&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrfutil install toolchain-manager&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;Finally, the command worked and the output looked good:&amp;nbsp;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrfutil toolchain-manager env --as-script&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;Then to tie it all together, I exported the contents to the file that gets picked up&amp;nbsp;by &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;zephyr-env.sh&lt;/span&gt; with&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrfutil toolchain-manager env --as-script &amp;gt; ~/.zephyrrc&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;Now &amp;quot;all&amp;quot; I need to do is open a terminal and run one command to get a build environment:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;source /opt/nordic/ncs/v2.3.0/zephyr/zephyr-env.sh&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:arial, helvetica, sans-serif;"&gt;Phew! I don&amp;#39;t know why these basics are so hard...&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect: How to build from command line after doing automatic install</title><link>https://devzone.nordicsemi.com/thread/466993?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 15:59:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ed9d6a4-b57d-4bba-ae09-822c47cffcea</guid><dc:creator>Kyrre Aalerud</dc:creator><description>&lt;p&gt;When using docker with sdk 2.5.1 I found the execution of&amp;nbsp;single unit tests via west build no longer worked. Changing to the right folder was no longer possible as the launching of a shell via the entry point meant I would either have a shell with environment&amp;nbsp;that did not handle the commands, or a shell without the environment that would.&lt;/p&gt;
&lt;p&gt;Using the nrfutil command Peter posted allowed preparing the shell and then west build could run the specific unit tests again. The big question is, what is the intended way of running a single test seeing how this seems like a workaround?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect: How to build from command line after doing automatic install</title><link>https://devzone.nordicsemi.com/thread/466987?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 15:31:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:edd1105b-ddf3-4fe3-a653-c1dbb04b6a19</guid><dc:creator>Kyrre Aalerud</dc:creator><description>&lt;p&gt;Wow! Thank you for noting this!&lt;/p&gt;
&lt;p&gt;Now, if only they would allow us to just have it update the environment so different builds could actually work again that would be nice. Or am I missing something?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect: How to build from command line after doing automatic install</title><link>https://devzone.nordicsemi.com/thread/457507?ContentTypeID=1</link><pubDate>Mon, 27 Nov 2023 09:55:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40ecf20d-1a14-4c34-b172-26a978053778</guid><dc:creator>Peter Bone</dc:creator><description>&lt;p&gt;For anyone ending up here with the same need for a way to setup the environment without using the toolchain manager to launch a shell, the toolchain manager itself provides a way to export the current environment as a script:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;~/ncs-lcs/nrfutil toolchain-manager env --as-script&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect: How to build from command line after doing automatic install</title><link>https://devzone.nordicsemi.com/thread/394804?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 19:55:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19aa5a94-956c-42f9-86a0-5de63cb5614a</guid><dc:creator>HarjitS</dc:creator><description>&lt;p&gt;This is the source for Toolchain Manager v1.2.1 that launches the terminal:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicSemiconductor/pc-nrfconnect-toolchain-manager/blob/61950bebc94c7e9b7315a18aaf3bf84be2c7d043/src/Manager/nrfutil/terminal.ts"&gt;github.com/.../terminal.ts&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For Windows, looks like they use: nrfutil-toolchain-manager.exe in:&lt;br /&gt;c:\Users\&amp;lt;YOUR ALIAS&amp;gt;&amp;gt;\.nrfconnect-apps\node_modules\pc-nrfconnect-toolchain-manager\resources\nrfutil-toolchain-manager\win32&lt;br /&gt;&lt;br /&gt;There is a similar directory for Linux, Apple, etc. The &amp;quot;win32&amp;quot; changes to the appropriate name for the OS.&lt;/p&gt;
&lt;p&gt;I really hope Nordic will provide a &amp;quot;nRFCmdStart&amp;quot; or something like that that does the equivalent of above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect: How to build from command line after doing automatic install</title><link>https://devzone.nordicsemi.com/thread/394800?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 19:34:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:387fd902-730c-4f1f-8ffc-2ff4117153b4</guid><dc:creator>HarjitS</dc:creator><description>&lt;p&gt;Thank you for sharing. Unfortunately, this will break if you update the SDK. I really would like to see Nordic provide a script file.&lt;/p&gt;
&lt;p&gt;The Toolchain manager uses the Nordic script and also VSCode-&amp;gt;Terminal-&amp;gt;+-&amp;gt;nRF Connect does.&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/pastedimage1667934743840v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I tried to find the script location but was not able to.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect: How to build from command line after doing automatic install</title><link>https://devzone.nordicsemi.com/thread/394792?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 18:38:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebf3a0ed-624d-47e9-aefd-e97532f46d2e</guid><dc:creator>mchartier</dc:creator><description>&lt;p&gt;I could not find one so I made my own.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;pre class="ui-code" data-mode="text"&gt;# nRF Connect
export NCS_SDK=/opt/nordic/ncs/v2.1.0
export NCS_TOOLCHAIN=/opt/nordic/ncs/toolchains/v2.1.0
export ZEPHYR_SDK_INSTALL_DIR=$NCS_TOOLCHAIN/opt/zephyr-sdk
export PATH=$PATH:$NCS_TOOLCHAIN/bin:$NCS_TOOLCHAIN/usr/bin:$NCS_TOOLCHAIN/usr/local/bin:$NCS_TOOLCHAIN:/opt/bin:$NCS_TOOLCHAIN/opt/nanopb/generator-bin:$NCS_TOOLCHAIN/opt/zephyr-sdk/arm-zephyr-eabi/bin
# source $NCS_SDK/zephyr/zephyr-env.sh&lt;/pre&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect: How to build from command line after doing automatic install</title><link>https://devzone.nordicsemi.com/thread/394789?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 17:59:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a4e50d6-2a7e-4d22-9af6-a9497063cab1</guid><dc:creator>HarjitS</dc:creator><description>&lt;p&gt;Is there a script or batch file we can execute that is equivalent to starting the shell from the toolchain manager? This way, we can always just execute that script or batch file and it will work with any updates/changes from Nordic.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect: How to build from command line after doing automatic install</title><link>https://devzone.nordicsemi.com/thread/394354?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2022 09:43:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5f1b93d-7509-466f-97f7-c44b7b4288b7</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thank you for the information, I will close it then.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect: How to build from command line after doing automatic install</title><link>https://devzone.nordicsemi.com/thread/394187?ContentTypeID=1</link><pubDate>Fri, 04 Nov 2022 14:03:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8fece50-dcac-4c0c-ba15-1d619dc945a9</guid><dc:creator>mchartier</dc:creator><description>&lt;p&gt;I compared the env vars between a regular shell and the &amp;lsquo;ncs&amp;rsquo; shell and manually copied over the changes to my shell. Seems crude but so far it seems to work. As for vs code, I did figure out how to build the app using vs code, but the trick was manually configuring the extra kconfig files required by the app. You can close this out.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect: How to build from command line after doing automatic install</title><link>https://devzone.nordicsemi.com/thread/390051?ContentTypeID=1</link><pubDate>Mon, 10 Oct 2022 13:40:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:808a8048-6f8a-4f3d-8648-7cd07049fd1e</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The thing that happens when you start the shell from toolchain manager is that it sets up the environmental variables for a given SDK version.&lt;/p&gt;
&lt;p&gt;You can add those variables by yourself if desired in your ~/.bashrc file for example.&lt;/p&gt;
&lt;p&gt;VS Code runs the same west commands under the hood as you would in the terminal. There should be no need to do things differently.&lt;/p&gt;
&lt;p&gt;When you build in VS Code you should be able to see the exact command used to build the application in the compiler output.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect: How to build from command line after doing automatic install</title><link>https://devzone.nordicsemi.com/thread/389877?ContentTypeID=1</link><pubDate>Fri, 07 Oct 2022 20:16:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:215b8b9c-b05f-42fd-aaf0-e49e7745fe77</guid><dc:creator>mchartier</dc:creator><description>&lt;p&gt;Let me add some background here. When I started using nRF Connect I chose the automatic installation method. This seems like the best choice to get started quickly. Then I enrolled in the&amp;nbsp;&lt;span&gt;nRF Connect SDK Fundamentals course. So far so good. But now I started using&amp;nbsp;some of the sample projects and they all seem to use the command line to build &amp;amp; flash. This works fine if you open the terminal from the toolchain manager. What is not clear to me is how to switch&amp;nbsp;between command line and VS Code on the same project. For example, some of the example projects use kconfig overlay files which are listed on the build commands. If I switch over to VS Code I guess I need to edit the application setup and add the kconfig file there? This behavior is new to me. I&amp;#39;m used to running &amp;#39;make&amp;#39; from the command line with no options because all the details are stored in the makefiles. Then your IDE can just run the same make command.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In short, I was hoping to learn how to use VS Code and the command line on the same project. In the short term I want to make this work for the sample projects but later I need to get the same behavior working with my own project.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>