Unable to build sample application on Windows

Hi,

I installed nRF Connect SDK (1.9.1) using Toolchain Manager v0.10.3, and nRF Connect for Desktop v3.11.0. Before that I also installed NRF command line tools 10.15.4.

My OS is Windows 10.

I installed VS Code 1.67.0 and all extensions that the Toolchain Manager recommended. The extensions were installed from within the Toolchain manager.

All this is a new install. I never used the Nordic SDK before.

I installed the SDK in c:\nordic\ncs

In VSCode, I performed the quick setup:

After that I created a Freestanding application from a sample. The application location is c:\nordic\myapps and the application name is lpuart-test. The application was created Ok. 

But when I tried to create build configuration and build it, the build step fails with this error:

> Executing task: nRF Connect: Generate config nrf52833dongle_nrf52833 for c:\nordic\myapps\lpuart-test <

Building lpuart-test
west build --build-dir c:\nordic\myapps\lpuart-test\build c:\nordic\myapps\lpuart-test --pristine --board nrf52833dongle_nrf52833 -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DBOARD_ROOT:STRING="c:/nordic/myapps/lpuart-test"

usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ...
west: error: argument <command>: invalid choice: 'build' (choose from 'init', 'update', 'list', 'manifest', 'diff', 'status', 'forall', 'help', 'config', 'topdir', 'selfupdate')
The terminal process terminated with exit code: 2.

 

This seems to be exactly the same problem as mentioned here (for OS X):

devzone.nordicsemi.com/.../can-t-build-example-application-in-visual-studio-code-osx

That post mentions about invoking "west init". I tried to invoke west, but it complains the Python is not found.

What do I need to do in order to resolve the above? I just want to build one the provided sample applications.

Thank you,

D.

Parents
  • Hello D. 

    This is a strange behavior.  

    That post mentions about invoking "west init". I tried to invoke west, but it complains the Python is not found.

    Did you try this within the Command Prompt or Git bash from the Toolchain Manager dropdown menu? 

    Kind regards,
    Øyvind

  • Hello Øyvind,

    Yes, I tried but it fails:

    501@c-DF0V MINGW64 /c/nordic/myapps/lpuart-test
    $ west init
    FATAL ERROR: already initialized in C:\nordic\ncs\v1.9.1, aborting.
    Note:
    In your environment, ZEPHYR_BASE is set to:
    C:/nordic/ncs/v1.9.1/zephyr

    This forces west to search for a workspace there.
    Try unsetting ZEPHYR_BASE and re-running this command.

    I also tried unsetting ZEPHYR_BASE as it recommended. I unset it in the terminal window. Then west init worked and completed Ok. I opened VS Code again, but the problem is still there. I also tried updating the Quick Configuration - set the SDK to be the one that west init downloaded in my sample application folder. Still the same error.

    What else can I try?

    Yesterday, I also tried removing everything (SDK and all supporting software that I installed), including cleaning all user directories that were created. Then re-installing again. No luck - the error is still there.

    Thank you,

    D.

Reply
  • Hello Øyvind,

    Yes, I tried but it fails:

    501@c-DF0V MINGW64 /c/nordic/myapps/lpuart-test
    $ west init
    FATAL ERROR: already initialized in C:\nordic\ncs\v1.9.1, aborting.
    Note:
    In your environment, ZEPHYR_BASE is set to:
    C:/nordic/ncs/v1.9.1/zephyr

    This forces west to search for a workspace there.
    Try unsetting ZEPHYR_BASE and re-running this command.

    I also tried unsetting ZEPHYR_BASE as it recommended. I unset it in the terminal window. Then west init worked and completed Ok. I opened VS Code again, but the problem is still there. I also tried updating the Quick Configuration - set the SDK to be the one that west init downloaded in my sample application folder. Still the same error.

    What else can I try?

    Yesterday, I also tried removing everything (SDK and all supporting software that I installed), including cleaning all user directories that were created. Then re-installing again. No luck - the error is still there.

    Thank you,

    D.

Children
No Data
Related