Moving an application to a west workspace doesn't work

I am using VSCode with nRF extension with the latest 2.9.1 SDK.

I have been working on an application for bluetooth for the 54L15-DK.

I want to do a custom sensor driver and from what I was reading it might be easier to do this if my applicaiton is part of a west workspace.

So I used the command pallet to do that in the folder of my application.

When it is done I see my application is now in a folder called application.

My build configuration is gone, however, so I add a new one. After selecting my options which is that DK and debug mode I get the following error:


Building application
west build --build-dir /Users/tpitman/Projects/Holley/TPMS/BLETPMSBridge/application/build /Users/tpitman/Projects/Holley/TPMS/BLETPMSBridge/application --pristine --board nrf54l15dk/nrf54l15/cpuapp -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y

usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ...
west: unknown command "build"; workspace /Users/tpitman/Projects/Holley/TPMS/BLETPMSBridge does not define this extension command -- try "west help"

I have tried making a brand new copy of a sample and doing the same thing and get the same error.

What do I do now? I creates the build folder and a single file called .vscode-nrf-connect.json, but nothing else and I can't do anything with it at this point.

I am totally stuck now and my app is screwed.

Parents Reply Children
  • I already tried the Update West and that didn't help.

    I ended up starting all over and can't remember the exact steps, but now have a west workspace and my sample base app in it. Sorry I can't remember what all I did.

    I suggest maybe you try the steps I took which is to create a new app (not workspace) from the Bluetooth Peripheral sample. Then try to turn it into a west workspace using the menu item.

    If it works for you to do that, then we can close this ticket as a one off issue.

  • I get an error as well. Can you watch this and confirm that I do the same as you, and if the error is similar?

  • It looks like your error might be different than the one I am getting. If you look at my original post in this thread you can see the error. It starts with:

    west: Unknown command "build"....

    It probably doesn't matter, but I noticed you chose 2.9.0 and I am using 2.9.1...

  • I will report this command to our VS Code team.

    As a workaround:
    I suggest that you try to follow our course on Lesson 7 – Device driver model on how to set up the workspace from the CLI instead of using the VS Code functionality.

    Then try to open the sample from VS Code by opening the folder of that sample.
    Verify from the build logs that it uses your new workspace to build instead of another SDK install.

    What do you think about this workaround?

  • I have a working west workspace at the moment. If that workaround works for you then I assume it is fine. I am going to move on now since I have this working.

    Thanks.

Related