West workspace

Hello,

I have created a standalone application using the NCS nrf SDK and Zephyr. I do manage all my project dependencies using West. I have some questions related to the west workspace:

1. Should I always create a west workspace using the `west init` command? Can I store a west workspace with its .west/config file in git? Or should I only store the west.yml and source files? I think it would be easier for the user only to clone one repo and do a `west update` instead of creating a workspace, cloning a git repo inside the workspace, and finally updating the dependencies.

2. Is there a way to store all dependencies in a subfolder in the workspace or is the "Zephyr" folder mandatory?

Thank you and best regards.

Christopher

Parents
  • 1. Should I always create a west workspace using the `west init` command? Can I store a west workspace with its .west/config file in git? Or should I only store the west.yml and source files? I think it would be easier for the user only to clone one repo and do a `west update` instead of creating a workspace, cloning a git repo inside the workspace, and finally updating the dependencies.

    I don't think there should be any issues adding .west/config in git, and then clone the project, and run west update (requires two steps).

    However, another approach is to use the west init -m <url> command, which will clone the project and create a west workspace in one command, then you can run west update (this approach also requires only two steps).

    Take a look at this project for a demonstration how to go about this: https://github.com/OeySa/nRF9160-Hello_Board 

    This project will also fetch all the nRF Connect SDK dependencies when running west update (https://github.com/OeySa/nRF9160-Hello_Board/blob/95f6cb7fb44e0269396be983e4298b2b1366211b/west.yml#L10(the only thing you need to do to update NCS is to modify the NCS version)

    2. Is there a way to store all dependencies in a subfolder in the workspace or is the "Zephyr" folder mandatory?

    I played around and created a project with the following structure:

    • hello_world
      • ...
      • west.yml
    • my_dependencies
    • ncs_dependencies
      • .west

    It is located here: https://github.com/simon-iversen/application_as_manifest 

    Then you can run west init -m https://github.com/simon-iversen/application_as_manifest, and then west update (from ncs_dependencies). Then all the ncs dependenceis will be put into ncs_dependencies. I could not figure out how to keep the .west file in the top directory and still place all the ncs specific modules inside the ncs_dependencies.

    Please let me know if you are looking for something like this, and I will figure out how to do this properly.

    Best regards,

    Simon

Reply
  • 1. Should I always create a west workspace using the `west init` command? Can I store a west workspace with its .west/config file in git? Or should I only store the west.yml and source files? I think it would be easier for the user only to clone one repo and do a `west update` instead of creating a workspace, cloning a git repo inside the workspace, and finally updating the dependencies.

    I don't think there should be any issues adding .west/config in git, and then clone the project, and run west update (requires two steps).

    However, another approach is to use the west init -m <url> command, which will clone the project and create a west workspace in one command, then you can run west update (this approach also requires only two steps).

    Take a look at this project for a demonstration how to go about this: https://github.com/OeySa/nRF9160-Hello_Board 

    This project will also fetch all the nRF Connect SDK dependencies when running west update (https://github.com/OeySa/nRF9160-Hello_Board/blob/95f6cb7fb44e0269396be983e4298b2b1366211b/west.yml#L10(the only thing you need to do to update NCS is to modify the NCS version)

    2. Is there a way to store all dependencies in a subfolder in the workspace or is the "Zephyr" folder mandatory?

    I played around and created a project with the following structure:

    • hello_world
      • ...
      • west.yml
    • my_dependencies
    • ncs_dependencies
      • .west

    It is located here: https://github.com/simon-iversen/application_as_manifest 

    Then you can run west init -m https://github.com/simon-iversen/application_as_manifest, and then west update (from ncs_dependencies). Then all the ncs dependenceis will be put into ncs_dependencies. I could not figure out how to keep the .west file in the top directory and still place all the ncs specific modules inside the ncs_dependencies.

    Please let me know if you are looking for something like this, and I will figure out how to do this properly.

    Best regards,

    Simon

Children
No Data
Related