This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Building command line outside the SDK directory

I copied the slm application into a directory outside the SDK (e.g. C:\temp\slmapp) and I launched a command prompt from the nRF Connect's tool chain manager. Then I navigated to the C:\temp\slmapp using "cd" and issued the build command "west build -b nrf9160dk_nrf9160ns". The project build successfully.

Then, I launched the command prompt from the windows start menu and then I issued the same west build command and I got the following error:

what is the difference between the two methods? What is needed to get the second method working? I confirmed the PATH variable, they both seem to be similar.

Parents
  • Hi.

    If you look at the replies here, you see that launching the executable file \toolchain\git-bash.exe, which is located in your ncs folder, will open a bash shell where you are able to build without any problems. This is because launching this sets up the correct environment, like setting the ZEPHYR_BASE, in the same way that the Toolchain Manager does when opening bash or command prompt from there. 

    If you want to know more about how this is done, you can take a look at the files \toolchain\git-cmd.cmd and \toolchain\cmd\env.cmd.

    For more information about west build error you get, you can check out this link about troubleshooting West.

    Best regards,

    Marte

Reply
  • Hi.

    If you look at the replies here, you see that launching the executable file \toolchain\git-bash.exe, which is located in your ncs folder, will open a bash shell where you are able to build without any problems. This is because launching this sets up the correct environment, like setting the ZEPHYR_BASE, in the same way that the Toolchain Manager does when opening bash or command prompt from there. 

    If you want to know more about how this is done, you can take a look at the files \toolchain\git-cmd.cmd and \toolchain\cmd\env.cmd.

    For more information about west build error you get, you can check out this link about troubleshooting West.

    Best regards,

    Marte

Children
No Data
Related