<?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>Unable to build blinky project outside SDK folder</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80126/unable-to-build-blinky-project-outside-sdk-folder</link><description>Hello, 
 I am unable to build basic blinky project outside the NRF Connect sdk. 
 Board - Thingy 91 - nRF9160 
 SDK version - 1.7.0 
 builiding through command line tools - CMake and Ninja (windows) 
 I have provided build variables in the Cmakelists</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Mar 2022 13:28:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80126/unable-to-build-blinky-project-outside-sdk-folder" /><item><title>RE: Unable to build blinky project outside SDK folder</title><link>https://devzone.nordicsemi.com/thread/356904?ContentTypeID=1</link><pubDate>Tue, 08 Mar 2022 13:28:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e5a4177-8b80-4754-ab33-09b4f621aef3</guid><dc:creator>Suhas_MS</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I know this Q&amp;amp;A thread has been idle for a long time, but I have found a solution for the issue and it&amp;#39;s working in Windows Operating System.&lt;/p&gt;
&lt;p&gt;Run the following commands. (Even for windows, keep Posix path names)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;setx ZEPHYR_BASE &amp;quot;C:/nrfZephyrSDK/nrf&amp;quot;

west config --system zephyr.base C:/nrfZephyrSDK/zephyr
west config --system zephyr.base-prefer configfile
west config --system manifest.path C:/nrfZephyrSDK/nrf
west config --system manifest.file west.yml
west config --system build.board_warn false

west config --global zephyr.base C:/nrfZephyrSDK/zephyr
west config --global zephyr.base-prefer configfile
west config --global manifest.path C:/nrfZephyrSDK/nrf
west config --global manifest.file west.yml
west config --global build.board_warn false&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;- Suhas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to build blinky project outside SDK folder</title><link>https://devzone.nordicsemi.com/thread/331755?ContentTypeID=1</link><pubDate>Wed, 29 Sep 2021 13:07:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4723b01a-55e0-4ed0-b2dd-8a3b158e84c5</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p&gt;Hello Suhas,&lt;/p&gt;
[quote user="Suhas_MS"]Please let me know how I can establish the out-of -tree application repository properly.[/quote]
&lt;p lang="en-GB"&gt;I will demonstrate this based on the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.0/zephyr/samples/hello_world/README.html#hello-world"&gt;Hello World&lt;/a&gt; sample on an Ubuntu distribution. The installation path of the nRF Connect SDK is &amp;quot;&lt;em&gt;$HOME/ncs&lt;/em&gt;&amp;quot;, resulting in:&lt;/p&gt;
&lt;p lang="en-GB"&gt;&lt;pre class="ui-code" data-mode="text"&gt;~$ echo $ZEPHYR_BASE
/home/user/ncs/zephyr&lt;/pre&gt;&lt;/p&gt;
&lt;p lang="en-GB"&gt;In addition to all other required tools, the variable has to &lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/v2.6-branch/samples/hello_world/CMakeLists.txt#L5"&gt;point to the right Zephyr&lt;/a&gt; within your build environment.&lt;/p&gt;
&lt;p lang="en-GB"&gt;Now I just copy the &lt;em&gt;hello_world&lt;/em&gt; folder from &amp;quot;&lt;em&gt;$HOME/ncs/zephyr/samples/hello_world&amp;quot;&lt;/em&gt; to a different location, e.g. &amp;quot;&lt;em&gt;$HOME/_work/outoftree/&amp;quot;&lt;/em&gt;.&lt;/p&gt;
&lt;p lang="en-GB"&gt;From there, I run:&lt;/p&gt;
&lt;p lang="en-GB"&gt;&lt;pre class="ui-code" data-mode="text"&gt;~/_work/outoftree/hello_world$ west build -b nrf9160dk_nrf9160ns

-- west build: generating a build system

...

...

-- west build: building application

[1/171] Preparing syscall dependency handling

[6/171] Performing build step for &amp;#39;spm_subimage&amp;#39;

[1/216] Preparing syscall dependency handling

[209/216] Linking C executable zephyr/zephyr_prebuilt.elf

[216/216] Linking C executable zephyr/zephyr.elf

Memory region Used Size Region Size %age Used

FLASH: 64 KB 64 KB 100.00%

SRAM: 11808 B 64 KB 18.02%

IDT_LIST: 0 GB 2 KB 0.00%

[163/171] Linking C executable zephyr/zephyr_prebuilt.elf

[170/171] Linking C executable zephyr/zephyr.elf

Memory region Used Size Region Size %age Used

FLASH: 28940 B 960 KB 2.94%

SRAM: 6528 B 178968 B 3.65%

IDT_LIST: 0 GB 2 KB 0.00%

[171/171] Generating zephyr/merged.hex&lt;/pre&gt;&lt;/p&gt;
&lt;p lang="en-GB"&gt;Regards,&lt;/p&gt;
&lt;p lang="en-GB"&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to build blinky project outside SDK folder</title><link>https://devzone.nordicsemi.com/thread/331754?ContentTypeID=1</link><pubDate>Wed, 29 Sep 2021 06:41:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b242ba73-313a-4292-b870-620b612d1ffd</guid><dc:creator>Suhas_MS</dc:creator><description>&lt;p&gt;Hello Markus,&lt;/p&gt;
&lt;p&gt;I have already tried this approach and this downloads the whole SDK again to my workspace.&lt;/p&gt;
&lt;p&gt;I need to implement an application out of the SDK directory as given in -&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.0/nrf/dm_adding_code.html#id3"&gt;Workflow 2: Out-of-tree application repository&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This approach will help us maintain the application only with our repository and decouple it with NRF SDK. That is the reason why I have added ZYPHER_BASE to my CMakelists.txt&lt;/p&gt;
&lt;p&gt;but this approach doesn&amp;#39;t seem to work.&lt;/p&gt;
&lt;p&gt;Please let me know how I can establish the out-of -tree application repository properly.&lt;/p&gt;
&lt;p&gt;Thank You.&lt;/p&gt;
&lt;p&gt;- Suhas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to build blinky project outside SDK folder</title><link>https://devzone.nordicsemi.com/thread/331753?ContentTypeID=1</link><pubDate>Tue, 28 Sep 2021 19:03:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:229669ea-5aae-43b5-ae69-88a2eb3297a5</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p lang="en-GB"&gt;Hello Suhas,&lt;/p&gt;
[quote user="Suhas_MS"]I need a freestanding application.[/quote]
&lt;p lang="en-GB"&gt;Got you!&lt;/p&gt;
&lt;p lang="en-GB"&gt;You might want to have a look at the section &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.0/nrf/dm_adding_code.html#adding-your-own-code"&gt;Adding your own code&lt;/a&gt; in the NCS documentation. I will provide you with an example based on &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.0/nrf/dm_adding_code.html#workflow-4-application-as-the-manifest-repository"&gt;Workflow 4: Application as the manifest repository&lt;/a&gt;.&lt;/p&gt;
&lt;p lang="en-GB"&gt;In the root folder of your freestanding Blinky sample, create a file named &lt;em&gt;west.yml&lt;/em&gt; containing the following:&lt;/p&gt;
&lt;p lang="en-GB"&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Example application-specific west.yml, using manifest imports.
manifest:
  remotes:
    - name: ncs
      url-base: https://github.com/nrfconnect
  projects:
    - name: nrf
      repo-path: sdk-nrf
      remote: ncs
      revision: v1.6.1
      import: true
  self:
    path: blinky_app&lt;/pre&gt;&lt;/p&gt;
&lt;p lang="en-GB"&gt;path should be the root folder name of the Blinky sample, which in this case “blinky_app”. NCS version to be used&amp;nbsp;in this example will be v1.6.1, but this can be changed to basically any other version.&lt;/p&gt;
&lt;p lang="en-GB"&gt;Now, in your workspace folder where “blinky_app” is the manifest repository, run the following command:&lt;/p&gt;
&lt;p lang="en-GB"&gt;&lt;pre class="ui-code" data-mode="text"&gt;west init -l blinky_app&lt;/pre&gt;&lt;/p&gt;
&lt;p lang="en-GB"&gt;followed by:&lt;/p&gt;
&lt;p lang="en-GB"&gt;&lt;pre class="ui-code" data-mode="text"&gt;west update&lt;/pre&gt;&lt;/p&gt;
&lt;p lang="en-GB"&gt;When finished, you should have a full nRF Connect SDK repository within your workspace.&amp;nbsp;Switching to “blinky_app”, you can now run the build command:&lt;/p&gt;
&lt;p lang="en-GB"&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -b thingy91_nrf9160ns&lt;/pre&gt;&lt;/p&gt;
&lt;p lang="en-GB"&gt;followed by:&lt;/p&gt;
&lt;p lang="en-GB"&gt;&lt;pre class="ui-code" data-mode="text"&gt;west flash --erase&lt;/pre&gt;&lt;/p&gt;
&lt;p lang="en-GB"&gt;I hope this will help you.&lt;/p&gt;
&lt;p lang="en-GB"&gt;Regards.&lt;/p&gt;
&lt;p lang="en-GB"&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to build blinky project outside SDK folder</title><link>https://devzone.nordicsemi.com/thread/331752?ContentTypeID=1</link><pubDate>Tue, 28 Sep 2021 14:57:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f6f1d29-ef2b-487d-a769-1d395901e391</guid><dc:creator>Suhas_MS</dc:creator><description>&lt;p&gt;Yes I have installed nRF Connect SDK according to the guideline. This can be confirmed because, the application compiles correctly inside the SDK.&lt;/p&gt;
&lt;p&gt;I need a freestanding application.&lt;/p&gt;
&lt;p&gt;the west command will not build anything,&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;PS C:\Users\Suhas\eclipse-workspace\blinky&amp;gt; west build -b thingy91_nrf9160ns
usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] &amp;lt;command&amp;gt; ...
west: error: argument &amp;lt;command&amp;gt;: invalid choice: &amp;#39;build&amp;#39; (choose from &amp;#39;init&amp;#39;, &amp;#39;update&amp;#39;, &amp;#39;list&amp;#39;, &amp;#39;manifest&amp;#39;, &amp;#39;diff&amp;#39;, &amp;#39;status&amp;#39;, &amp;#39;forall&amp;#39;, &amp;#39;help&amp;#39;, &amp;#39;config&amp;#39;, &amp;#39;topdir&amp;#39;, &amp;#39;selfupdate&amp;#39;)
PS C:\Users\Suhas\eclipse-workspace\blinky&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1632840914855v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thank you.&lt;/p&gt;
&lt;p&gt;-suhas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to build blinky project outside SDK folder</title><link>https://devzone.nordicsemi.com/thread/331751?ContentTypeID=1</link><pubDate>Tue, 28 Sep 2021 14:03:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50378106-20c0-4f12-bc17-0f7eab6a43f7</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p lang="en-GB"&gt;Hello Suhas,&lt;/p&gt;
&lt;p lang="en-GB"&gt;have you installed the nRF Connect SDK according to this &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.0/nrf/gs_installing.html#installing-manually"&gt;guideline&lt;/a&gt; and performed all steps?&lt;/p&gt;
&lt;p lang="en-GB"&gt;Is there a reason why you are using this build command?&lt;/p&gt;
&lt;p lang="en-GB"&gt;&lt;pre class="ui-code" data-mode="text"&gt;cmake -B build -GNinja -DBOARD=thingy91_nRF9160_ns&lt;/pre&gt;&lt;/p&gt;
&lt;p lang="en-GB"&gt;Normally, we recommend to use this one instead:&lt;/p&gt;
&lt;p lang="en-GB"&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -b thingy91_nrf9160ns&lt;/pre&gt;&lt;/p&gt;
&lt;p lang="en-GB"&gt;Regards,&lt;/p&gt;
&lt;p lang="en-GB"&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>